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
What do you mean by query optimization?
Is stored procedure faster than query?
Can you have more than one key in a database?
Explain how you can copy a file to file content and file to pl/sql table in advance pl/sql?
Write the command to remove all players named sachin from the players table.
How to find 3rd highest salary of an employee from the employee table in sql?
What is the best sql course?
What is a pdo connection?
Is postgresql a nosql database?
Is primary key an index?
What are pl sql data types?
How do you use collections in procedure to return the resultset?
What is set serveroutput on?
how many columns can be used for creating index? : Sql dba
How can use stored procedures in sql?