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
How can I make sql query run faster?
What is sqlca in db2?
How is debugging done?
Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?
Is inner join faster than left join?
how many ways to get the current time? : Sql dba
What is interval partition?
Can a trigger call a stored procedure?
Does access use sql?
What are the benefits of pl sql?
Is record in pl sql?
How do I write a sql query in pgadmin 4?
Mention what plvcmt and plvrb does in pl/sql?
Does pl/sql support create command?
How to avoid using cursors? What to use instead of cursor and in what cases to do so?