Help on SQL
Posted in 1995
/G=T./S=Kalyan/@nsc.sprint.com — — source: Informix-list mailing list archive (1991-1998)
The result set we get for ...
SELECT col1, col2, col3 FROM tbl1 ORDER BY col1, col2, col3
... is as shown below :
col1 col2 col3
^^^^ ^^^^ ^^^^
Null Null A
Null Null B
Null A A
Null A B
Null B A
A A A
A A B
A B A
Is it possible to write a SQL so that the NULL values are pushed
to the bottom and the ordering remains the same.
The resultant set should be as shown below.
col1 col2 col3
^^^^ ^^^^ ^^^^
A A A
A A B
A B A
Null A A
Null A B
Null B A
Null Null A
Null Null B
Thanks,
Kalyan.