解决方案 »
- SQl 数据库取值问题
- 大家帮我看一看 这个过程,谢谢!
- pivottable 和 dso创建的数据挖掘模型有什么区别?
- 有什么SQL语句可以把一个表里的两个字段连接起来吗?是"竖"连接.不是:field1+field2连接!!!!!
- 我的windows 2003的时间老是回到2001年,我如何设置?
- 大小姐提问啦! sql 统计的问题:0 和 null 怎么区别!
- sql server 关于数据库提问
- 请问,用代码更新SQL SERVER中表的列的代码是什么啊!在线等待!
- 求一个难度比较大的SQL语句!!急,多谢帮忙,顶就有分
- 如何从visio2002导出到access或ms sql server数据库呢?
- SQL 列拼接行展示
- 在select语句查询时重命名列名
from [Eble_ForRent]
如果只返回一个字段的不重复值,也可以用 DISTINCT,不用 GROUP BY。
select (case when [Frent_BrandId] is not null then [Frent_BrandId]
else [Frent_UserId] end) as resultCol
from [Eble_ForRent]
select distinct case when [Frent_BrandId] is not null then [Frent_BrandId]
when [Frent_BrandId] is null then [Frent_UserId] end 'Frent_BrandId'
from [Eble_ForRent]