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 are the operators in sql?
What is snowflake sql?
What are the three forms of normalization?
What is the limitation on the block size of pl/sql?
Is ms sql traffic encrypted?
Hi how to import oracle sequence in Informatica? Please write stored procedure code that will import oracle sequence in Informatica SP transformation as per below scenario Oracle table product list Pro_id, pro_name 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights Now a new flat file with new product list needs to be added to oracle table product list with oracle sequence. flat file product Prono,pro_name, 1, 20 watt tube light 2, 30 watt tube light & target should be like 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights. 104, 20 watt tube light 105, 30 watt tube light thks reg suvarna joshi suvarnaatsuvarna@rediffmail.com
What is rtm stands for?
Why commit is not used in triggers?
Explain what is sql?
what is “go” in t-sql? : Transact sql
How does stored procedure reduce network traffic?
What will you get by the cursor attribute sql%found?
What is the difference between joins?
Write an sql query to select all records from the table?
What are all the common sql functions?