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 are different types of refreshment techniques of materialised view

2 Answers  


Is ms sql is free?

0 Answers  


Can two tables have same primary key?

0 Answers  


How to assign sql query results to pl sql variables?

0 Answers  


Can we join 3 tables in sql?

0 Answers  






What is hibernate and its relation to sql?

0 Answers  


what is clause? : Sql dba

0 Answers  


what is the difference between blob and text? : Sql dba

0 Answers  


Why trigger is used in sql?

0 Answers  


What is clustered and non-clustered indexes?

4 Answers   Microsoft,


What is the difference between pl and sql?

0 Answers  


Is pl sql a scripting language?

0 Answers  


Categories