【正文】
ct b, identity (int,1,1) as bIDinto tmp from tblselect sum (b) from tmp where bid%20select sum (b) from tmp where bid%2=0。select sname, 課程, score from students inner join score on studentsID=scode inner join course on courseID=課程號 where 課程號=39。 and score60select sname score from students inner join score on studentsID=Score where course=39。create function aa(a int,b int)returns intbeginreturn a*b endgoselect (6,4)create function aaa(a varchar)returns tableasreturn select * from grade where 課程號=agoselect * from (39。select stuname,writtenexam,labexamfrom stuinfo,stumark where =and (writtenexamwrittenpass or labexamlabpass)select n=count(*) from stumark where writtenexamwrittenpass or labexamlabpassgodeclare nn intexec stu_pro22 64,60,nn outputif nn3print39。+convert(varchar(10),labpass)print39。create proc stu_pro22writtenpass int=60,labpass int=60,n int outputasprint39。+convert(varchar(5),sum)+ 39。+convert(varchar(5),sum)+ 39。 ]解除綁定sp_unbindefault 、使用與刪除語法CREATE RULE rule_name AS condition_expression新建一個規(guī)則,規(guī)則名為RU_Student,限制該字段的值為16—25use stumanagerselect * from stuinfoselect * from stumarkdrop procedure pro_stucreate procedure pro_stunotpass int output,writtenpass int=64,labpass int=60 asselect stuname , writtenexam,labexam from stuinfo join stumark on =where writt