增加(insert)
- INSERT INTO STUDENT(`NAME`) VALUES ('赵六')
- INSERT INTO STUDENT SET NAME='胡歌'
1:支持多条插入与子查询
INSERT INTO STUDENT(`NAME`)
SELECT CNAME
FROM COURSE
WHERE CID=1
修改(update)
UPDATE STUDENT S LEFT JOIN COURSE C ON S.CID=C.CID
SET S.NAME='江疏影'
WHERE S.ID=6
删除(delete)
- delete from 表名 where 条件
- truncate table 表名
区别: