source destination distance
chennai bangalore 500
bangalore chennai 500
hyd delhi 1000
delhi hyd 1000
bangalore hyd 800
Here chennai to bangalore and bangalore to chennai is same distance. and hyd and delhi also same criteria.
Based on the distance i want to display only one row using sql query?
Answer Posted / deepak
select source, destination, distance from Distance_rcd where source>destination
union select destination, source, distance from Distance_rcd where source<destination
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What are transaction and its controls?
What are different types of statements supported by sql?
What are the different types of database management systems?
What is difference between pl and sql?
How can you know that statistics should be updated?
What is AUTH_ID and AUTH_USER in pl/sql ?
What are the datatypes available in pl/sql ?
What is clustered index sql?
what is the stuff function and how does it differ from the replace function? : Sql dba
What is trigger explain it?
What does data normalization mean?
What is scalar data type in pl sql?
What are all the different normalizations?
How to run sql statements with oracle sql developer?
What are the types of index in sql?