当前位置: 代码迷 >> Java Web开发 >> oracle有关问题?
  详细解决方案

oracle有关问题?

热度:41   发布时间:2016-04-17 12:44:05.0
oracle问题??
oracle查询时如何实现让某一列不能有重复值?sql语句该怎么写呢?用distinct好像只能限制所有列。

------解决方案--------------------
改用group by 
其它列怎么获取了就要看你实际情况了
select a,max(b),max(c) from table group by a
------解决方案--------------------
某一列不能有重复值 其他字段也要取么?
1 age name
(如果是1不取) age1 name1
2 age2 name2
  相关解决方案