insert
1)插入一行 insert into customers values(null,'pep','100 street','los angeles','ca','90046','usa',null,null); 依赖表中列的定义次序!
insert into customers(cust_name, cust_city, cust_state, cust_zip, cust_country, cust_contact, cust_email) 更安全的方法
values('pep','100 street','los angeles','ca','90046','usa',null,null)
insert into customers(cust_name, cust_city, cust_state, cust_zip, cust_country, cust_contact, cust_email)
values('pep','100 street','los angeles','ca','90046','usa',null,null),
('pep','100 street','new york','ca','1111','usa',null,null)
一次插入多组,每组值用一个圆括号扩起来,用逗号隔开。
update
由三部分组成:1要更新的表;2列名和他们的值;3 确定要更新行的过滤条件
update customers
set cust_email='10029@qq.com'
where cust_id=1005;
delete
delete from customers
where cust_id=1006;
21章-30章没看