----创建存储过程
create proc[edure] 存储过程名
[
{@参数1 参数类型}[=默认值][output],
......,
{@参数n 参数类型}[=默认值][output],
]
as
SQL 语句块

----执行存储过程
exec/execute 存储过程名

----带参数的简单存储过程实例

create proc p_Employee
 @count int output
as
 print 'Records number:'
 Select count(*) From dbo.Employee
 print @count
go

declare @sumcount int
exec p_Employee @sumcount
go

相关文章:

  • 2022-01-04
  • 2021-05-26
  • 2021-09-04
  • 2021-09-03
  • 2021-06-08
猜你喜欢
  • 2021-10-01
  • 2022-02-12
  • 2022-12-23
  • 2021-11-19
  • 2021-11-30
  • 2022-12-23
  • 2021-04-17
相关资源
相似解决方案