时间:2021-07-01 10:21:17 帮助过:23人阅读
// 创建表 CREATE TABLE employee( id INT NOT NULL PRIMARY KEY, name VARCHAR(50), city VARCHAR(50) DEFAULT "Hangzhou", salary FLOAT DEFAULT "1000" ); // 向表中插入数据 INSERT INTO employee VALUES(1, "Tom", "Beijing", "1100"); INSERT INTO employee (id, name) VALUES(2, "Jack"); // 修改某列的默认值 ALTER TABLE employee ALTER city SET DEFAULT "Beijing"; // 删除某列的默认值 ALTER TABLE employee ALTER city DROP DEFAULT;
常用SQL语句
标签:code key lte tom hang 默认 employee 创建数据库 creat