能否让select语句返回的不是记录集而是字符串 declre @s varchar(8000)set @s=''select @s=@s+','+myfield from mytableselect 结果=substring(@s,2,8000) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select myfield from mytable where myfield in ('a','b','c','d')or select myfield from mytable where myfield like '[a-d]' declare @a varchar(8000)set @a=''select @a=@a+' 'myfield from mytableselect @a declare @a varchar(8000)set @a=''select @a=@a+' 'myfield from mytableselect ltrim(@a) 结果 declare @a varchar(8000)set @a=''select @a=@a+' '+myfield from mytableselect ltrim(@a) 结果 SQLite语法错误 select 结果怎么替换 存储过程(简单) 2008R2 安装,总是报错,删注册表都累死了... 重装了windows server 2003,虽然没报com+错误,但是到最后一步出错,还是装不起!!求指点 【问一个弱弱弱弱的问题】,写了一半的东西,不会写了,解决就送分。 如何在存储过程中判断一条sql语句是否执行成功 SQLServer能不能在控制台进行操作? 不知这样的sql语句能不能写出呀!! 我怎么就是转不过弯来? 关于declare问题 如何通过Sql语句将一个表中的日期型字段转化为字符串类型??在线等待
or
select myfield from mytable where myfield like '[a-d]'
set @a=''select @a=@a+' 'myfield from mytableselect @a
set @a=''select @a=@a+' 'myfield from mytableselect ltrim(@a) 结果
set @a=''select @a=@a+' '+myfield from mytableselect ltrim(@a) 结果