Skip to content

Inserting rows · ⁨插入行⁩

English

Adding rows with INSERT

INSERT adds a new row to a table. List the columns, then a matching set of VALUES:

Text goes in single quotes; numbers do not. The values must line up with the columns, in the same order.

中文

用 INSERT 添加行

INSERT 给表添加一个新行。先列出列,再给出一组对应的 VALUES:

INSERT INTO product (code, title, price, in_stock)
VALUES ('P04', 'Ruler', 1.20, 75);

文本放在单引号里,数字不用。值必须和列一一对应,顺序也要一致。

INSERT 在表的末尾添加一行新数据

Handout

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩