create function getResult(@str nvarchar(100))
returns nvarchar(100)
as
begin
return execute(@str)
end
--执行SQL
select dbo.getResult(Express) from A
------解决方案--------------------
SQL code
declare @str varchar(100)
--set @str='1+232+89*89'
select @str=Express from A
execute('select '+@str+'')
------解决方案--------------------