1、DML(insertdeleteupdateselect)1、 insertinsert into 表名(属性名列表)values (属性值列表)insert into P(pno,pname) values(P7,Pn7)insert into P(pno,weight,color,pname)values(p8,15,绿,pn8)insert into p values(p9,pn9,红,25)2、 DeleteDelete from 表名 where 条件表达式 删除所有零件Delete from p删除所有红色的零件Delete from p where color=红 删除所有红色的
2、,重量小于15的零件Delete from p where color=红 and weight,=,=,=13 =13 and weight=18范围:select * from pwhere weight between 13 and 18集合运算:select *from pwhere weight in(13,14,15,16,17,18)查询零件的重量18 的零件的所有信息Select * from p where weight18供应商所在城市中有京的城市Select * from s where city like %京%:表示0到多个任意字符_:表示一个字符查询没有分配班级的学生Select *from 学生 where 班级 is NULL2.Select * from J3.Select * from J where city=上海5.Select SNO from SPJ where JNO=J1and PNO=P125.Update P set COLOR=橙 where COLOR=红26.delete from SPJ,Pwhere coler=红and PNO=PNO30.insert into SPJ(SNO,JNO,PNO,QTY)values(S1,J3,P3,500)