| From: | Tomasz Myrta <jasiek(at)klaster(dot)net> |
|---|---|
| To: | Ian Burrell <ib(at)onsitetech(dot)com> |
| Cc: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Re: Sorting by NULL values |
| Date: | 2003-03-04 20:01:31 |
| Message-ID: | 3E65061B.9020907@klaster.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
Ian Burrell wrote:
> I am doing a query where I need to sort by a column that may be NULL
> because it is coming from an OUTER JOIN. I noticed a difference between
> PostgreSQL and other databases about where NULLs show up. It seems that
> with Postgres, NULLs are sorted after other values. Other databases
> sort them before.
>
> Is there any standard on how sorting NULLs work? Is there a way to
> change Postgres's behavior? Is there a way to replace the NULLs with
> empty strings?
order by field is null asc/desc, field asc/desc
Regards,
Tomasz Myrta
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dan Langille | 2003-03-04 20:07:29 | Re: Sorting by NULL values |
| Previous Message | Jean-Luc Lachance | 2003-03-04 19:52:54 | Re: Forcing query to use an index |