Mega Code Archive

 
Categories / MySQL Tutorial / Insert Update Delete
 

INSERTing data

The basic syntax for the INSERT statement is as follows. INSERT INTO <table_name> VALUES ( value1, value2, etc...... ); The above format will work fine if you are inserting data into every field in a row. If you only want to insert data into certain fields (columns) you will need to specify only these fields as part of the statement. INSERT INTO <table_name> ( column1, column2, .... ) VALUES ( value1, value2, .... );