Differences between UNIQUE and DISTINCT in select statements
Answer Posted / kkparambath
SELECT DISTINCT Example
The "Persons" table:
P_Id LastName FirstName Address City
1 Hansen Ola Timoteivn10 Sandnes
2 Svendson Tove Borgvn 23 Sandnes
3 Pettersen Kari Storgt 20 Stavanger
Now we want to select only the distinct values from the
column named "City" from the table above.
We use the following SELECT statement:
SELECT DISTINCT City FROM Persons
The result-set will look like this:
City
Sandnes
Stavanger
| Is This Answer Correct ? | 7 Yes | 9 No |
Post New Answer View All Answers
What is a variable in sql?
What are sql data types?
What is auto increment in sql?
What is a record in pl/sql?
what is self-join? : Sql dba
what is a stored procedure? : Sql dba
Can you upgrade sql express to full sql?
What is sql in java?
What are sql triggers used for?
What is the difference between delete and truncate commands?
What is pl sql record in oracle?
Can procedure in package be overloaded?
Is vs as in pl sql?
Can we enter data in a table in design view?
What is use of trigger?