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 the different operators available in sql?

0 Answers  


Is natural join same as inner join?

0 Answers  


scope of exception handling in plsql

4 Answers   Wipro,


Give which cursor is better for better performance means type of cursors?

2 Answers  


is it mandatory to select all the column in a view then what columns should be selected

2 Answers  






What is exit statement?

0 Answers  


How many types of privileges are available in sql?

0 Answers  


How does stored procedure reduce network traffic?

0 Answers  


What is string data type in sql?

0 Answers  


how to get enames with comma seperated values by deptwise on emp table?

8 Answers  


explain the difference between myisam static and myisam dynamic. : Sql dba

0 Answers  


What does desc stand for?

0 Answers  


Categories