南京伊尔美整形医院:sql 聚合查询
来源:百度文库 编辑:高校问答 时间:2024/04/30 06:55:46
如何把多个列合成一个列,然后查询?
如一个表内有列名为: 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