which command in MySQL is used to add a new record in the existing table write it's syntax?
Answers
Answer:
Let's look at the basic syntax of the SQL INSERT command shown below.
INSERT INTO `table_name`(column_1,column_2,...) VALUES (value_1,value_2,...);
HERE
INSERT INTO `table_name` is the command that tells MySQL server to add new row into a table named `table_name`.
(column_1,column_2,...) specifies the columns to be updated in the new row
VALUES (value_1,value_2,...) specifies the values to be added into the new row
When supplying the data values to be inserted into the new table, the following should be considered while dealing with different data types.
String data types - all the string values should be enclosed in single quotes.
Numeric data types - all numeric values should be supplied directly without enclosing them in single or double quotes.
Date data types - enclose date values in single quotes in the format 'YYYY-MM-DD'.
Answer:
INSERT
Explanation:
INSERT INTO `table_name`(column_1,column_2,...) VALUES (value_1,value_2,...);