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 do you optimize a stored procedure in sql?

499


What are the different type of joins in sql?

542


Is pl sql a scripting language?

588


Is hadoop a nosql?

571


What is sql and db2?

531






what are the maximum number of rows that can be constructed by inserting rows directly in value list? : Transact sql

498


How do I truncate a sql log file?

530


What are the types of variable use in pl sql?

564


What are local and global Indexes and where they are useful.

925


how to check myisam tables for errors? : Sql dba

597


How to run sql*plus commands in sql developer?

589


What is loop in pl sql?

572


How do I truncate a word?

522


How is a process of pl/sql compiled?

598


What is the order of sql select?

572