這個資料庫建立沒有什麼難度,但是我就是陷入了一種錯誤的思維,一直跳不出來,剛剛靈光一現,跳出迴圈,終於跳出錯誤的模式,構建好了乙個資料庫儲存過程。
--1、建立乙個儲存過程no_grade,顯示有所選課程沒有成績的學生的學號、姓名、
-- 所選全部課程名稱及其成績。
use stu_cou
go create procedure no_grade
as select student.sno,course.cno,sname,cname,grade
from student,sc,course
--where grade is null and student.sno=sc.sno and course.cno=sc.cno
where student.sno in
(select sno
from sc
where grade is null
)and course.cno in
(select cno
from sc
where sc.sno=student.sno
)and student.sno=sc.sno and course.cno=sc.cno
乙個資料庫解鎖的儲存過程sp who lock
將所有死鎖的 死鎖的 id找出來,然後再kill。set quoted identifier off goset ansi nulls off gocreate procedure sp who lock asbegin declare spid int,bl int,inttransactionc...
乙個資料庫查詢的問題
有乙個表user book記錄了一名使用者擁有的書籍的資訊,表的資料如下 key userid bookid 1 1 2 2 1 3 3 1 4 4 2 1 5 2 3 這表明這名使用者1擁有2,3,4三本書,使用者2擁有1,3兩本書,以此類推。現在要用1個sql語句得到下面問題的結果 給出任意個b...
乙個小問題
error c2679 binary no operator defined which takes a right hand operand of type class smanip int or there is no acceptable conversion 除錯了好久,就是找不出問題在哪。...