gpt4 book ai didi

sql-server - 如何将参数传递给表值函数

转载 作者:行者123 更新时间:2023-12-01 23:25:36 25 4
gpt4 key购买 nike

我想做类似的事情

select * from tvfHello(@param) where @param in (Select ID from Users)

最佳答案

您需要使用CROSS APPLY来实现此目的

select 
f.*
from
users u
cross apply dbo.tvfHello(u.ID) f

关于sql-server - 如何将参数传递给表值函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/335886/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com