2. mysql 语句
基础语句
- 创建表
DROP TABLE IF EXISTS student;
CREATE TABLE student ( id INT (10) NOT NULL AUTO_INCREMENT, sname VARCHAR (20) NOT NULL, scroe INT (10), class VARCHAR (50), commen LONGTEXT, PRIMARY KEY (id, sname) ) DEFAULT CHARSET = 'utf8';
2. 删除表
drop table tabname;
3. 为表增加列(增加后不能删除,DB2中加上后类型不能改变,唯一能变的是长度)
ALTER TABLE student ADD COLUMN newcol VARCHAR (50) NOT NULL;
4.