日期:2014-05-18 浏览次数:20580 次
create proc p_test as begin declare @sql varchar(max) set @sql = ' create function [f_test]() returns int as begin return 1 end ' exec(@sql) select dbo.f_test() end go exec p_test /* 1 */ ------解决方案--------------------