# INSERT Statement

__*INSERT syntax*__
__*INSERT IGNORE*__

+ INSERT inserts rows into the table. The syntax is as follows:
  + `INSERT INTO table_name (column_list) VALUES (value_list) [,(value_list),...];` 
  + The number of columns in column_list and the number of values in values_list must be the same
  + The order of the values must match the order of the columns in the statement
  + Enclose column values of string and time data types (recommended) in single quotes
  + Numerical data does not need quotation marks
+ `INSERT IGNORE` example:

```7
tidb> CREATE TABLE t1(id INT PRIMARY KEY);
Query OK, 0 rows affected (0.61 sec)

tidb> INSERT INTO t1 VALUES(1);
Query OK, 1 row affected (0.01 sec)

tidb> INSERT INTO t1 VALUES(1);
~!@ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'@!~
tidb> INSERT ~!@IGNORE@!~ INTO t1 VALUES(1);
Query OK, 0 rows affected, ~!@1 warning@!~ (0.00 sec)

tidb> SELECT * FROM t1;
+----+
| id |
+----+
|  1 |
+----+
1 row in set (0.00 sec)
```

------------------------------------------------------------
Use the INSERT statement to insert a new row in a table.

INSERT IGNORE returns no errors when counters duplicate entry exception.
