数据库——增删改数据
作者:互联网
创建表
CREATE TABLE student(
sid INT,
sname VARCHAR(10),
ssex CHAR(5),
birth DATE,
score DOUBLE
)
插入数据
datetime 1999-09-09 09:09:09
INSERT INTO student VALUES(1,'小红帽','女','1999-09-09',99.9)
插入部分字段
INSERT INTO student(sid,sname) VALUES(2,'大灰狼')
修改语句
UPDATE student SET ssex='男' WHERE sid=2
UPDATE student SET birth='2000-09-09',score=55 WHERE sid=2
删除数据
DELETE FROM student WHERE sid=2
清空表
DELETE FROM student
TRUNCATE TABLE student
标签:WHERE,数据库,09,ssex,score,student,sid,增删,数据 来源: https://www.cnblogs.com/weirongqi/p/15336875.html