我有一个看起来像这样的表:
Make | Model
--------------
Ford | Bronco
Ford | Taurus
Honda | Accord
Ford | Thunderbird
Saab | 900
我需要一个SQL语句才能从Ford
列中仅输出Honda
,Saab
和Make
。
答案 0 :(得分:4)
SELECT DISTINCT Make
FROM YourTable
ORDER BY Make;
答案 1 :(得分:2)
select distinct Make from table_name
答案 2 :(得分:2)
SELECT DISTINCT Make
FROM YourTable
答案 3 :(得分:2)
SELECT DISTINCT Make
FROM MyTable
就是这样。