34,590
社区成员
发帖
与我相关
我的任务
分享
-->创建存储过程
if exists (select 1 from sysobjects where type='P' and name='Get_link')
drop proc Get_link
go
create proc Get_link(@id int)
as
begin
select a.* from tb a join cte b on a.id=b.linkid where a.id=@id
end
-->调用存储过程
exec Getlink '6'