Skip to content

Changing the schema · ⁨修改表结构⁩

English

Changing a table's structure

A table's design is not fixed. ALTER TABLE … ADD adds a new column to an existing table:

Existing rows get NULL in the new column until you fill them in.

中文

修改表的结构

表的设计不是一成不变的。ALTER TABLE … ADD 给已有的表添加一个新列:

ALTER TABLE product ADD weight DECIMAL(5, 2);

在你填入数据之前,已有的行在新列里都是 NULL。

ALTER TABLE ADD 给表新增一个空列

Handout

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

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