how to sort records in sql?

Answers were Sorted based on User's Feedback



how to sort records in sql?..

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

how to sort records in sql?..

Answer / satish asnani

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

how to sort records in sql?..

Answer / slokh

SELECT * FROM table_name
ORDER BY column_name ASC;

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What is the use of non clustered index?

0 Answers  


What are % TYPE and % ROWTYPE ? What are the advantages of using these over datatypes?

4 Answers  


How to display the contents of a current record fetched in a reference cursor?

2 Answers  


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?

4 Answers   IBM, Metric Stream,


What are the advantages of pl sql over sql?

0 Answers  






How long it takes to learn pl sql?

0 Answers  


What is the maximum database size for sql express?

0 Answers  


What are inner outer left and right joins in sql?

0 Answers  


use of IN/ANY/ALL

5 Answers   Ramco,


How many rows can sqlite handle?

0 Answers  


Can we use pl sql in sql server?

0 Answers  


Can a table contain multiple foreign key’s?

0 Answers  


Categories