insert into
student
(name
) values('张三') -- 注意结尾是英文单引号
insert intostudent
(name
,pwd
) values('李四','ab123456')
insert intostudent
(name
,pwd
)
values('刘一','112233'),('刘二','223344') -- 一次性插入多个字段
insert intostudent
values('9','ab123456','李四','人妖','2000-01-01','非洲','1221@qq.com') -- 可以直接写表名,但是里面数据要一一对应
-- 修改
UPDATE student setname
='狂神号',
UPDATE student setname
='狂神号61',
WHERE id BETWEEN 1 and 2 -- where 条件 between 1 and 2 不用括号的数字
-- 多个条件判断
UPDATE student setname
='长江七号' whereid
> 2 andsex
='人妖'
-- 删除
delete FROMstudent
where id=2