轻松上手,快乐学习!

SQL INSERT INTO 关键字


INSERT INTO

INSERT INTO命令用于在表中插入新记录。 以下SQL在“Customers”表中插入新记录:

实例

INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country)
VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway');
运行实例»
以下SQL将插入新记录,但仅在“CustomerName”,“City”和“Country”列中插入数据(CustomerID将自动更新):

实例

INSERT INTO Customers (CustomerName, City, Country)
VALUES ('Cardinal', 'Stavanger', 'Norway');
运行实例»