SQL语法问题 有一个变量是a= '1,2,3,4,5'select * from tb1 where aa in(@a)怎么让语句的效果是select * from tb1 where aa in('1','2','3','4','5') 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from tb1 where charindex(','+aa+',',','+a+',')>0 select * from tb1 where charindex(','+ltrim(aa)+',',','+a+',')>0 http://www.yongfa365.com/Item/PROCEDURE-IN-SQL-Server.html declare @a varchar(20)set @a= '1,2,3,4,5'exec('select * from tb1 where aa in('+@a+')') select * from tb1 where charindex(','+ltrim(aa)+',',','+a+',')>0 主A机与备份B机上都安装有sql server 2000,要实现数据实时备份到B机上,要怎么设置处理? 奇怪, QA在命令行可以运行,在开始菜单就无法运行,提示 求救,这样的汇总语句怎么写? 大力,登山者,还好吗,一个关于表关联的问题 关于update的sql语句 高手指点,在线等.. 不好意思,我跑这里问个关于ldap的问题,看看能不能有人解答,高分相送 关于数据库性能的问题 万分火急1!!!各位兄弟姐妹们如何在VC6.0中在ADO数据库操作中执行SQL出错,请各位帮助 存储过程要怎么写才性能高 sql 定义变量后,内存什麽时候释放 求一左连接sql语句
select * from tb1 where charindex(','+ltrim(aa)+',',','+a+',')>0
set @a= '1,2,3,4,5'
exec('select * from tb1 where aa in('+@a+')')