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 error ora-12154: tns:could not resolve the connect identifier specified?

0 Answers  


Can we edit a view in sql?

0 Answers  


What is difference between cursor and trigger?

0 Answers  


What SQL keyword must immediately follow the UNION ALL statement? 1. SELECT 2. INTO 3. ORDER 4. WHERE 5. JOIN

4 Answers  


What is intersect?

1 Answers  






I have a table .in the table 100 recored is there .we have get the single row with out using clause..

3 Answers  


What are the two types of exceptions in pl/sql?

0 Answers  


What is data control language?

0 Answers  


How many subqueries can be nested in a statement?

0 Answers  


Interchange the value of a column Gender in a table where values are Male and Female. So, where the value is Male, it should changed to Female and Female to Male.

4 Answers   Cap Gemini, IBM,


What is sql rowcount?

0 Answers  


Why do you partition data?

0 Answers  


Categories