select b.* from kc_Course a,kc_ClassRoom b
where a.ClassRoomTypeId=b.ClassRoomTypeId
and CHARINDEX(','+LTRIM(a.CourseId)+',',','+'21,22,23'+',')>0
SQL SERVER 使用字符串‘21,22,23‘报错无法转int处理
最新推荐文章于 2023-05-20 13:17:47 发布
select b.* from kc_Course a,kc_ClassRoom b
where a.ClassRoomTypeId=b.ClassRoomTypeId
and CHARINDEX(','+LTRIM(a.CourseId)+',',','+'21,22,23'+',')>0