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 / monika

if u want to display output in two columns like f1.a,f1.b
then use
select * from(select f1 from t1)a,
select f1 from tt order by f1 desc)b);

if want to display output in same column then use union
like-

select f1 from t1
union
select f1 from t1 order by f1 desc;

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a trigger word?

1030


What is sql injection owasp?

1070


What is difference between inner join and self join?

1089


What is recursive join in sql?

1031


what are the differences between char and nchar? : Sql dba

1118


Why partition by is used in sql?

1046


what are date and time data types? : Sql dba

991


What are system versioned tables?

1034


what are the differences between get and post methods in form submitting. Give the case where we can use get and we can use post methods? : Sql dba

1137


What is the maximum number of columns in sql table?

1175


What is crud stand for?

1003


What are the qualities of 2nf?

1040


What are the different types of dbms?

1016


What is sqlservr exe?

986


What is scope and visibility in PL/SQL?

1210