22,298
社区成员
发帖
与我相关
我的任务
分享
我是知道这种办法的,
定义多个变量,防止超长,
只不过我觉得这种方法有点不靠谱,虽然是能实现,
以后存储过程内容越来越多的话,又要来定义多几个变量了.....
就想问问有没有其他方法的,
不过算了,实在没有就就这样吧
create table test(name varchar(255))
go
create procedure sp_001
as
begin
select 1;
end;
go
-- 把这个文本写到 test 表中。
insert into test exec sp_helptext 'sp_001'
go
select * from test
go
drop table test
go
drop procedure sp_001
go