SQL – Insert data into table using mysql interface

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.

Roll_no Student_name Subject Marks
1 John Math 90
2 Rita Math 95
3 Sam Math 84
4 Jack Math 72
5 Pom Math 99

In previous chapter, we have created table using mysql interface.

Before proceeding further check:

Insert data into table using mysql interface:

Step 01:

From left column, click on the plus sign beside to your  database name.

insert data into table using mysql interface

Then all the tables of the database will slide down.

Insert data into table using mysql interface phpmyadmin

Step 02:

Click on the table, in which you want to insert data. In our example, I am intending to insert data into student_name table.

Insert data into table using mysql interface phpmyadmin

Such above screen is going to appear. From top menu panel links, click on insert.

Step 03:

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.

Insert data into table using mysql interface phpmyadmin

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.

Step 08:

If you notice, the insert interface has repetitive pattern to insert data value for each column.

Insert data into table using mysql interface phpmyadmin

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.

insert data into table using phpmyadmin

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.

insert data into table using phpmyadmin

I have inserted all the values for rest of the rows.

Step 09:

Then look at the bottom. There is link for go. Click on go.

insert data into table from phpmyadmin

Step 10:

Then following status page is going to appear.

insert data into table from phpmyadmin

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.

How to check values are inserted successfully?

From left column, click on the table name. Table name is going to appear with all the inserted records.

Insert data into table using mysql interface phpmyadmin

insert data into table from phpmyadmin

See our table contains five records.