MySQL PHPMYADMIN interface has made easy to insert data into table. Lets see how we are going to insert data. We are going to insert values and for reference we have following pictorial representation of student marks table.
In previous chapter, we have created table using mysql interface.
Before proceeding further check:
From left column, click on the plus sign beside to your database name.
Then all the tables of the database will slide down.
Click on the table, in which you want to insert data. In our example, I am intending to insert data into student_name table.
Such above screen is going to appear. From top menu panel links, click on insert.
Then following screen is going to appear. By default This is showing to insert two records (rows). Look at the bottom, there is option to change number of records (rows) to insert.
In our example, we are aware that we are going to insert 5 records (rows). So change the value to 5 and it will slide down input fields to insert more rows.
If you notice, the insert interface has repetitive pattern to insert data value for each column.
So lets insert values for first row from the above pictorial table example.
First row has roll_no 1, student_name john, subject math, and marks 90.
In the above we are not going use function, but we are going to provide values only.
So in the first box for value for roll_no enter 1.
second box for value for student_name enter john
Third Box for value for subject enter math
Fourth box for value for marks enter 90.
NOTE: At this point, if you click on go, it will insert only one row. Then you have again return back to insert interface and insert rest rows. Otherwise you can insert values for rest rows.
I have inserted all the values for rest of the rows.
Then look at the bottom. There is link for go. Click on go.
Then following status page is going to appear.
If you see, inside yellow matte it is saying ‘5 rows inserted’.
Congratulations you have successfully inserted 5 rows into the table.
WARNING: At this point, towards right side bottom you could see Go button. Dont click on it. Otherwise it will reinsert values again.
From left column, click on the table name. Table name is going to appear with all the inserted records.
See our table contains five records.