Declare @UserIDList VarChar(20), 
        
@SQL NVarChar(200)

Set @UserIDList='1,2,3'
Set @SQL='Select * from Member Where UserID IN('+@UserIDList+')'
--使用拼写的SQL语句,然后使用Sp_ExecuteSQL
Exec Sp_ExecuteSQL @SQL

相关文章:

  • 2022-12-23
  • 2022-02-27
  • 2021-10-01
  • 2022-02-12
  • 2022-12-23
  • 2022-12-23
  • 2022-02-25
  • 2021-05-31
猜你喜欢
  • 2021-06-11
  • 2021-11-03
  • 2021-09-08
  • 2021-12-08
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
相关资源
相似解决方案