存储过程
@a为外部传入进来的一个字符串,如'102,2033,561'等等,里面全部是数字
select xx from t1 where id in(@a)
出错,
因为id是int型,这种情况有没有什么好的处理办法?
select xx from t1 where id in(102,2033,561) 不会出错select xx from t1 where cast(id as varchar) in('102','2033','561') 不会出错
@a为外部传入进来的一个字符串,如'102,2033,561'等等,里面全部是数字
select xx from t1 where id in(@a)
出错,
因为id是int型,这种情况有没有什么好的处理办法?
select xx from t1 where id in(102,2033,561) 不会出错select xx from t1 where cast(id as varchar) in('102','2033','561') 不会出错
CSDN现在才是人气时候?
本来打算明天起来看看有没有回帖的....
致敬..