" /> " />
PDF

1
2
SELECT DISTINCT column_name(s)
FROM table_name

There is a table "Persons":

P_IdLastNameFirstNameAddressCity
1 Hansen Ola Timoteivn 10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger

For this we use this query:

1
SELECT DISTINCT City FROM Persons

Query Result:

City
Sandnes
Stavanger

Comments

 
+11 #1 Шелест Константин 2010-10-28 22:07 Without repeating tuples cool ... Quote
 
 
0 #2 Сергей С 2011-08-15 12:03 But how to choose and at the same time P_Id? Quote
 
 
+2 #3 AVK_Alex 2011-08-17 16:00
But how to choose and at the same time P_Id?

I think
P_Id, City FROM Persons
Quote
 
 
-3 #4 хуес два 2011-10-12 17:19 two hues Quote
 
 
-1 #5 три 2011-10-12 17:45 times two, then sit down and read the manual Quote
 
 
-1 #6 aperturer 2011-11-30 10:53
But how to choose and at the same time P_Id?

City, P_Id FROM Persons
Quote
 
 
+2 #7 Iluha 2011-12-07 14:22 Quote
 
 
+3 #8 SkyMan 2012-01-16 09:53
But how to choose and at the same time P_Id?





Quote
 
 
+2 #9 Антон 2012-03-15 06:52
Sandnes
Sandnes
Quote
 
 
+1 #10 soft_master 2012-04-18 16:05


SELECT * FROM Persons
WHERE






1
2




WHERE




City

Sandnes
Sandnes







Quote
 

Authorization

Nice Ajax Poll

Which one of my extensions is the best?

Statistics

Advertisement