Oracle

Sorting

Figo Kim 2006. 8. 28. 20:56
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
  • Sorting in descending order
SELECT last_name,job_id,department_id, hire_date
FROM employees
ORDER BY hire_date DESC;
  • Sorting by column alias
SELECT employee_id,last_name,salary*12 annsal 
FROM employees
ORDER BY annsal;
  • Sorting by multiple columns

SELECT last_name,department_id,salary
FROM employees
ORDER BY department_id,salary DESC;


- NULL values are displayed last for ascending sequences and first for descending sequences.

'Oracle' 카테고리의 다른 글

Substitution Variable  (0) 2006.08.28
Sorting  (0) 2006.08.28
Using the "ORDER BY" clause  (0) 2006.08.28
Using the "ORDER BY" clause  (0) 2006.08.28
Logical Conditions  (0) 2006.08.27