Insert Data in MySQL Database | Coding Tag

Insert Data in MySQL Database

0 3120

As you read, How to Create Data. Now there is insertion Syntax after creating DATABASE. 'INSERT' statement is used to insert data into table.

MySQL Insert Data Syntax:

INSERT INTO table_name
(column1, column2, column3)
(value1, value2, value3);

Where table_name is the name of table in which we want to insert data and column1, column2 and column3 is the name of the fields in the table table_name and value1, value2 and value3 are the values of the particular columns.


$sql="INSERT INTO student(name, emailid, city) VALUES('Vihaan','','Delhi')";
// student is table name
if ($result)
echo "Record Created Successfully";
echo "Insertion Failed";

Best WordPress Hosting


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price

Leave a Reply

    Waiting for your comments