how to sort records in sql?
Answers were Sorted based on User's Feedback
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 |
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 |
Answer / slokh
SELECT * FROM table_name
ORDER BY column_name ASC;
Is This Answer Correct ? | 1 Yes | 0 No |
What is sql select statement?
What is column?
define sql
In a table i have columns A,B,C and i have a composite index on columns A,B if so will the following query uses index or not? SELECT sal,name FROM <table_name> WHERE A=<value> AND B=<value> AND C=<value>;
Explain two easy sql optimizations.
How to get help at the sql prompt?
how to start mysql server? : Sql dba
What are the types of sql commands?
what is the cursor and use of cursor in pl/sql ?
How do I partition a table in sql?
What is the purpose of using pl/sql?
Which command is used to call a stored procedure?