SELECT DISTINCT column_name,column_name
FROM table_name;
Contoh :
Misal tabel [Sales].[Customer]
select custid,companyname, address,city from [Sales].[Customers];
1 Anda PT. Jl. Ahmad Yani No.7 Surabaya
2 Bersama CV. Jl. Karimata no. 6 Surabaya
3 Kuda PT. Jl. Kerinci No.10 Bandung
4. Pertama PT. Jl.Sulawesi No.8 Jakarta
5. Laris CV. Jl. Jawa No.4 Denpasar
6. Modern PT. Jl. Merdeka No.4 Jakarta
select distinct city from [Sales].[Customers];
city
Bandung
Denpasar
Jakarta
Surabaya
Tidak ada komentar:
Posting Komentar