贱驴619评测:sql 聚合查询
来源:百度文库 编辑:查人人中国名人网 时间:2024/10/05 08:17:26
如何把多个列合成一个列,然后查询?
如一个表内有列名为: id,type,text,date
如何把 type,text,date 合成一个列查询?
二楼的!查询语句呢?
如一个表内有列名为: id,type,text,date
如何把 type,text,date 合成一个列查询?
二楼的!查询语句呢?
你的意思是想从这三个字段中查询某一值吧
select * from 表名 where id="" or type="" or text="" or date=""
select type+text+date as zh from
select isnull(type,'')+isnull(text,'')+isnull(date,'') as zh from 表名
select isnull(type,'')+isnull(text,'')+isnull(date,'') as zh from 表名
hgfjftgk