how to sort records in sql?
Answers were Sorted based on User's Feedback
Answer / hannan oca
by using order by asc or order by des;
we can sort the data.
Is This Answer Correct ? | 16 Yes | 0 No |
For EMP table
order by deptno asc OR order by deptno desc
Normally records with NULL values are listed at last. We can
change this by using "NULLS FIRST" or "NULLS LAST" along
with order by clause.
Ex: order by deptno nulls first
Is This Answer Correct ? | 4 Yes | 2 No |
Answer / slokh
SELECT * FROM table_name
ORDER BY column_name ASC;
Is This Answer Correct ? | 1 Yes | 0 No |
What is the use of non clustered index?
What are % TYPE and % ROWTYPE ? What are the advantages of using these over datatypes?
How to display the contents of a current record fetched in a reference cursor?
Suppose I have to create a view on a table, that is not yet been created by DBA. I khow the table structure. Is it possible to create the view before DBA creates this table? If yes then how? Is it possible to create synonym in this way?
What are the advantages of pl sql over sql?
How long it takes to learn pl sql?
What is the maximum database size for sql express?
What are inner outer left and right joins in sql?
use of IN/ANY/ALL
How many rows can sqlite handle?
Can we use pl sql in sql server?
Can a table contain multiple foreign key’s?