select_subject.sql
来自「证券公司考试系统,三层架构,从题库自动产生试卷,全部主观题」· SQL 代码 · 共 18 行
SQL
18 行
Drop procedure Select_Subject
go
Create procedure Select_Subject
--存储过程Select_Subject通过输入参数:专业、类型、难度、选题数目
--从题库中随机选出合乎条件的题目集合
(@Specialty varchar(50),@Style varchar(50),
@Difficulty varchar(50),@Select_Subject_Count smallint)
as
begin
SET ROWCOUNT @Select_Subject_Count
select ID,Style,Difficulty,Content,A_option,B_option,
C_option,D_option,E_option,F_option
from Subject_Table
where (Specialty=@Specialty)and(Style=@Style)
and(Difficulty=@Difficulty)
Order by newid()
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?