开发者

TSQL How to exec a stored procedure inside select query?

开发者 https://www.devze.com 2023-01-28 12:48 出处:网络
is it possible to execute a storep procedure inside select query ? select开发者_JS百科 e.Name, dbo.get_sth e.Id

is it possible to execute a storep procedure inside select query ?

select开发者_JS百科 e.Name, dbo.get_sth e.Id
from emp e

I get the error

Incorrect syntax near 'e.Id'


No. But you can execute a function inside a select statement. So recreate your Stored Procedure as a function and this should work.

It will be called for every row so be careful of performance if returning many rows.

0

精彩评论

暂无评论...
验证码 换一张
取 消