111,120
社区成员
发帖
与我相关
我的任务
分享select * from 表2 where Table_ID in (select ID from 表1)
select * from table1 where
exists(
select 1 from table2
where ',' + table2.T1_Id + ',' like
',%' + cast(table1.id as nvarchar(10)) + '%,'
)
select * from table1 where exists(select 1 from table2 where ',' + cast(table1.id as nvarchar(10)) + ',' like ',' + cast(table2.table_id as nvarchar(10)) + ',')
select * from 表2 where Table_ID in (select ID from 表1)