File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
2
2
Frequently Asked Questions (FAQ) for PostgreSQL
3
3
4
- Last updated: Thu Feb 24 19:32:04 EST 2005
4
+ Last updated: Thu Feb 24 19:33:07 EST 2005
5
5
6
6
Current maintainer: Bruce Momjian (pgman@candle.pha.pa.us)
7
7
645
645
FROM tab
646
646
WHERE col IS NULL;
647
647
648
- To sort by the NULLIS NULL
649
- and IS NOT NULL modifiers in your WHERE clause. Things that are true
650
- will sort higher than things that are false, so the following will put
651
- NULL entries at the top of the resulting list:
648
+ To sort by the NULL status, use the IS NULL and IS NOT NULL modifiers
649
+ in your WHERE clause. Things that are true will sort higher than
650
+ things that are false, so the following will put NULL entries at the
651
+ top of the resulting list:
652
652
SELECT *
653
653
FROM tab
654
654
ORDER BY (col IS NOT NULL)
Original file line number Diff line number Diff line change 10
10
alink ="#0000ff ">
11
11
< H1 > Frequently Asked Questions (FAQ) for PostgreSQL</ H1 >
12
12
13
- < P > Last updated: Thu Feb 24 19:32:04 EST 2005</ P >
13
+ < P > Last updated: Thu Feb 24 19:33:07 EST 2005</ P >
14
14
15
15
< P > Current maintainer: Bruce Momjian (< A href =
16
16
"mailto:pgman@candle.pha.pa.us "> pgman@candle.pha.pa.us</ A > )
@@ -828,7 +828,7 @@ <H4><A name="4.9">4.9</A>) In a query, how do I detect if a field
828
828
WHERE col IS NULL;
829
829
</ PRE >
830
830
831
- < P > To sort by the < SMALL > NULL</ SMALL status, use the < SMALL> IS NULL</ SMALL >
831
+ < P > To sort by the < SMALL > NULL</ SMALL > status, use the < SMALL > IS NULL</ SMALL >
832
832
and < SMALL > IS NOT NULL</ SMALL > modifiers in your < SMALL > WHERE</ SMALL > clause.
833
833
Things that are < I > true</ I > will sort higher than things that are < I > false</ I > ,
834
834
so the following will put NULL entries at the top of the resulting list:</ P >
You can’t perform that action at this time.
0 commit comments