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 is scalar function in sql?
Why we use stored procedure instead of query?
how many ways to get the current time? : Sql dba
How do you get column names only for a table (sql server)?
What is the difference between local and global temporary table?
what is column? : Sql dba
What is the sql*loader? : aql loader
Why do we use procedures in sql?
What is pl sql package?
What is sql performance tuning?
What is the starting oracle error number?
What is anonymous block in sql?
What are the two different parts of the pl/sql packages?
Why primary key is required?
What type of database is cloud sql?