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...

take one table is t1 and in that column name is f1
f1 column values are
200
5000
3000
7000
300
600
100
400
800
400
i want display the values asc and desc in a single output.
sample output is
f1.a
100
200
300
400
500
600
etc......
and f1.d is
5000
4000
3000
2000
1000
etc...

Answer Posted / anjum

select * from (select f1 from t1 order by f1 asc)
union all
select * from (select f1 from t1 order by f1 desc)

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible for a table to have more than one foreign key?

1027


What is the most common sql injection tool?

1035


What is the difference between microsoft sql and mysql?

954


What are different sql data types?

1032


What is the use of partition by in sql?

985


What is blind sql injection?

1059


Explain autonomous transaction.

1152


How can I delete duplicate rows?

1005


how to create a test table in your mysql server? : Sql dba

998


Why stored procedure is better than query?

937


is mysql query is case sensitive? : Sql dba

1087


Does asenumerable execute the query?

1036


What is auto increment feature in sql?

1116


What is the process of debugging?

1061


how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba

943