日期:2014-05-18 浏览次数:20567 次
--給你個基礎例子 if object_id('fn_a') is not null drop function dbo.fn_a; if object_id('proc_a') is not null drop procedure proc_a; if object_id('proc_test') is not null drop procedure proc_test; go create function dbo.fn_a() returns int as begin return 1 end go create proc proc_a @t int output as select @t=1; go create proc proc_test as declare @a int; exec proc_a @a output; select @a if @a=dbo.fn_a() print 1 else print 2; go exec proc_test;
------解决方案--------------------
判断两列内容完全一样吗?
不是你这么写的
还有你把整个过程都写到exec 里面就可以了