Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is java sql package?

1145


Can we use rowid as primary key?

1046


What is pl/sql table? Why is it used?

1094


Mention what is the use of function "module procedure" in pl/sql?

1090


How do I truncate a sql log file?

1138


What are the dml statements?

1196


How do you explain an index?

1334


What is difference between cursor and trigger?

1129


Does inner join return duplicate rows?

1039


Is stored procedure faster than query?

1021


What is a constraint? Tell me about its various levels.

1250


Which join is default?

1016


what is denormalization. : Sql dba

1162


Explain commit, rollback and savepoint.

1056


What is the purpose of design view?

1078