how to sort records in sql?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can there be 2 primary keys in a table?

559


how to rename an existing table in mysql? : Sql dba

582


What are the main features of cursor?

631


What is pivot table in sql?

526


Mention what problem one might face while writing log information to a data-base table in pl/sql?

682






What is compound trigger?

564


Which join is like an inner join?

529


How do you explain an index number?

540


What are the types of keys?

516


Can we insert data in view?

509


What are two statement types in sql?

540


How do sql databases work?

533


What is fmtonly in sql?

534


Hi how to import oracle sequence in Informatica? Please write stored procedure code that will import oracle sequence in Informatica SP transformation as per below scenario Oracle table product list Pro_id, pro_name 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights Now a new flat file with new product list needs to be added to oracle table product list with oracle sequence. flat file product Prono,pro_name, 1, 20 watt tube light 2, 30 watt tube light & target should be like 101, LED Lights. 102, 20watt CFL Lights. 103, 30 watt CFL lights. 104, 20 watt tube light 105, 30 watt tube light thks reg suvarna joshi suvarnaatsuvarna@rediffmail.com

2074


What does the argument [or replace] do?

583