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

How does a covering index work?

531


How to change sql*plus system settings?

544


Can a table contain multiple foreign key’s?

575


How do I create a sql database?

524


How do I find duplicates in a single column in sql?

536






What is the limitation on the block size of pl/sql?

532


How many types of index are there?

553


What is clustered index in sql?

588


What is Difference Between Unique and Primary Key Constraints?

606


What are sql functions? Describe in brief different types of sql functions?

487


What are the usages of sql?

564


What is indexing in sql and its types?

545


Describe sql comments?

561


Can I join the same table twice?

524


what is the difference between undefined value and null value? : Sql dba

562