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 row? : Sql dba

712


How do we use distinct statement? What is its use?

553


What is bitemporal narrowing?

737


What is sap sql?

536


what is a table called, if it has neither cluster nor non-cluster index? What is it used for? : Sql dba

524






Explain what is a view?

600


What is difference between joins and union?

533


What is auto increment feature in sql?

621


Is pl sql different from sql?

534


What is the difference between partition and index?

485


What are the operators in sql?

529


explain mysql aggregate functions. : Sql dba

549


What is pl sql script?

564


can sql servers linked to other servers like oracle? : Sql dba

552


how to create a new view in mysql? : Sql dba

498