我想将标量值选择查询作为参数传递给如下函数:
select * from dbo.ftLatestOrderLines(select max(id) from [orders])
数据库服务器抛出此错误:
Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'select'.
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near ')'.
有没有办法将查询作为参数传递?