select where in 问题 @id應該是 int類型exec('select * from name where id in ('+@id+')') 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 85,32 怎么可能转换为int类型呢? 改這樣declare @id varchar(1000)set @id='85,32'exec('select * from name where id in ('+@id+')') 偶觉得既然是动态的in语句,需用动态SQL,所以可以按2楼说的,exec('select * from name where id in ('+@id+')') ,其中@id为char(100)楼主的语句这样的语句数据库无法认别 存储过程传参问题 选出各组中与给定数最接近的记录 一个排除重复的多表查询 求个sql文,今天还有人吗 SQL2000 海量数据 【欢迎大家来讨论】 一个数据统计SQL怎么写 一个关于日期的问题 表的primary key 是不是已经创建了索引? 在开发中遇到sql查询问题!!!急 U8材料出库单根据存货编码取采购单价算出金额 Sql存储过程问题 如何建一个表?
set @id='85,32'
exec('select * from name where id in ('+@id+')')
exec('select * from name where id in ('+@id+')') ,
其中@id为char(100)
楼主的语句这样的语句数据库无法认别