March 30, 2010

How to insert data into Mysql table?

How to add/insert values to Mysql table using Mysql INSERT command/query?

Mysql "INSERT" query adds a new row to a table.

Syntax: INSERT INTO table_name (a,b,c) VALUES (value1, value2, value3);


Here i am explaining how to insert values/data into a table names "addressbook" which is having 3 columns "name" , "address" and "mobilenumber" and we are going to insert these value into the columns.


name: ebugg-i
address: mydiggin
mobilenumber: 232131123

Query:
INSERT INTO addressbook (name, address, mobilenumber) VALUES('ebugg-i', 'mydiggin', '232131123');


No comments: