学习打卡
3.1
CREATE TABLE Addressbook(
regist_no INTEGER NOT NULL,
name VARCHAR(128) NOT NULL,
address VARCHAR(256) NOT NULL,
tel_no CHAR(10),
mail_address CHAR(20),
PRIMARY KEY(regist_no));
3.2
ALTER TABLE Addressbook ADD COLUMN postal_code CHAR(8) NOT NULL;
【注】不同数据库管理系统的更新语句不同
3.3
DROP TABLE Addressbook;
3.4 (因drop语句删除的表无法恢复,只能通过create语句重新插入)
CREATE TABLE Addressbook(
regist_no INTEGER NOT NULL,
name VARCHAR(128) NOT NULL,
address VARCHAR(256) NOT NULL,
tel_no CHAR(10),
mail_address CHAR(20),
postal_code CHAR(8) NOT NULL,
PRIMARY KEY(regist_no));