我需要选择在特定列中具有不同值的任何记录的所有列,所以如果我有
Firts|Last|State|
Jacck|Redy|NJ
Jacck|Redy|NJ
Jacck|Redy|NY
Jacck|Redy|NY
Jacck|Redy|OH
Jacck|Redy|OH
我想得到
Jacck|Redy|NJ
Jacck|Redy|NY
Jacck|Redy|OH
答案 0 :(得分:0)
select first, last, state from table1 GROUP BY first, last, state
OR
select distinct first, last,state from table1