7.4 创建数据表 album
最后更新于:2022-04-01 00:41:22
在此我们仍然后前面章节提到的 test 数据库,在test数据库里添加一个album表并插入数据,具体如下:
~~~
CREATE TABLE album(id int(10) NOT NULL AUTO_INCREMENT,title varchar(100) NOT NULL,artist varchar(1000) NOT NULL,PRIMARY KEY(id));
INSERT INTO news(title,artist) VALUES(‘First album’,’artist01’);
INSERT INTO news(title,artist) VALUES(‘Second album’,’artist02’);
INSERT INTO news(title,artist) VALUES(‘Third album’,’artist03’);
INSERT INTO news(title,artist) VALUES(‘fourth album’,’artist04’);
INSERT INTO news(title,artist) VALUES(‘Fifth album’,’artist05’);
INSERT INTO news(title,artist) VALUES(‘Sixth album’,’artist06’);
~~~