不带参存储过程和带参存储过程

来源:互联网 发布:西安人工智能 编辑:程序博客网 时间:2024/05/16 15:02

create>    drop proc proc_get_student
go
create>
--调用、执行存储过程
exec proc_get_student;






--带参存储过程
if (object_id('proc_find_stu', 'P') is not null)
    drop proc proc_find_stu
go
create proc proc_find_stu(@startId int, @endId int)
as
    select * from dd_object where obj_type between @startId and @endId
go

exec proc_find_stu 2, 4;

0 0