Insertion of data into table:
We will study in this tutorial how to insert data into a table using MySQL console and phpMyAdmin. After creating table we need to insert values into respective fields. To describe or to know the design of a table do as follows:
i) Open the console of MySQL, and type desc table_name, output will be as follows:
Field will show every field's name, Type will show the datatype of every field, Null and Key are constraints (which will be discussed later), Default will show whether we have set any default value earlier,
insert into student values ('name', 21, 'emp_id');
Now to insert values into table:
ii) Using WAMP server, following screenshots will help you to learn how to insert into values into a table:
First of all we need to select a database ,
then open a specific table, after that do as follows:
After selecting a database you will get a page like the following, to insert values into a table, click on any of the icon, whose field is being marked.
Next page will be displayed like this, insert values in the boxes, (you can leave the function text boxes), click go button and the values will be inserted in the table.
Note: To know about creation of table and database in phpMyAdmin and MySQL console please visit our webpages: http://roseindia.net/tutorial/php/phpdatabase/PHP-Create-Table.html & http://roseindia.net/tutorial/php/phpdatabase/PHP-Create-Database.html
Posted on: November 2, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles