Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
EXEC [dbo].[SP] @Param = ( SELECT COUNT(id) FROM TABLE )
给出错误,那么下一个最好的事情是什么或者我做错了什么?
不使用Declare Set等等等等。
Declare
Set
在运行存储过程之前设置它?
SET @Para1 = (SELECT COUNT(id) FROM TABLE) EXEC [dbo].[SP] @Param = @Para1