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 / pooja gupta
select f1.a, f2.d from
(select f1 as a from t order by 1) f1,
(select f1 as d from t order by 1 desc)f2
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
what is union, minus and interact commands? : Sql dba
column A column b | output 10 7 | 10 5 8 | 8 7 -9 | 7 3 5 | 5 0 6 | 6 Write a sql query to print such output.
Does execute immediate commit?
What is the reports view in oracle sql developer?
What is the need of a partition key?
Explain the insert into statements in sql?
What are the disadvantages of file system?
How does sql developer connect to oracle database?
What are hotfixes and patches?
Is sqlite thread safe?
What are types of indexes in sql?
What is a design view?
Can we join tables without foreign key?
how is myisam table stored? : Sql dba
what are date and time data types in mysql? : Sql dba