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

select a.f1 f1.a,b.f1 f1.b
from t1 a t1 b
order by a.f1 asc,b.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

Could you please provide oca (oracle 10g) dumps for my certification ?

4513


What is the use of triggers?

545


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

1561


Are sql connections encrypted?

558


Why coalesce is used in sql?

471






What is difference sql and mysql?

535


Explain the purpose of %type and %rowtype data types with the example?

554


what is denormalization. : Sql dba

543


What is pl sql collection?

525


What is an index? What are the types of indexes? How many clustered indexes can be created on a table?

551


Is sql port 1433 encrypted?

576


What are primary key and foreign key and how they work?

554


Define commit?

551


Does sql profiler affect performance?

557


How do I run a sql query in pgadmin 4?

548