1、ER图,关系模式

2、创建存储过程

–创建名为 GetStuCou_DSS 的返回多个结果集的存储过程
create procedure GetStuCou_DSS
@StuNo nvarchar(64),
@Height nvarchar(32)
as
begin
if(@StuNo is not null and @StuNo <> ”)
begin
select *
from Student
where [email protected]
end

if(@Height is not null and @Height <> ”)
begin
select *
from Student
where [email protected]
end
end

–执行名为 GetStuCou_DSS 的返回多个结果集的存储过程
execute GetStuCou_DSS ‘005’,’185′

3、创建触发器

CREATE [ OR ALTER ] TRIGGER [ schema_name . ]trigger_name
ON { table }
[ WITH <dml_trigger_option> [ ,…n ] ]
{ FOR | AFTER }
{ [ INSERT ] [ , ] [ UPDATE ] [ , ] [ DELETE ] }
AS { sql_statement [ ; ] [ ,…n ] }

<dml_trigger_option> ::=
[ NATIVE_COMPILATION ]
[ SCHEMABINDING ]
[ EXECUTE AS Clause ]

https://www.cnblogs.com/Brambling/archive/2017/04/21/6741666.html

4、创建分区函数

计算机三级数据库考点

5、表值函数

计算机三级数据库考点

6、数据库优化

计算机三级数据库考点

相关文章: