SQL 存储过程中,将串连的字符串当表用。

select distinct order_no,IDENTITY(int,1,1) as px into #g from gold_purify_detail where order_no in (select a as gold_id from dbo.f_split(@order_str,','))

原文地址:https://www.cnblogs.com/withoutaword/p/2724357.html