SQL 学习笔记<五> 数据更新

INSERT INTO <表名>[(<属性列1>[,<属性列2>…])]

INSERT INTO SC(Sno, Cno) SELECT Sno, ‘1143’ FROM Student;

 

UPDATE SC SET Grade = NULL WHERE Cno = ‘1233’ AND Sno IN(

             SELECT Sno FROM Student WHERE Sdept = ‘Computer’);

 

DELETE FROM SC WHERE Sno IN(

             SELECT Sno FROM Student WHERE Sdept = ‘Computer’);

posted @ 2012-05-13 23:16  我是小菜鸟  阅读(171)  评论(0编辑  收藏  举报