Created
April 16, 2014 10:07
-
-
Save vincentdeelen/10846223 to your computer and use it in GitHub Desktop.
Order the two tables using nulls first
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select empno | |
, ename | |
, job | |
, deptno | |
from( | |
select null as empno | |
, null as ename | |
, null as job | |
, null as deptno | |
from emp | |
union | |
select empno | |
, ename | |
, job | |
, deptno | |
from emp | |
where deptno = 10 | |
) | |
order by empno nulls first |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment