Re: [SQL] null and integer field

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Hamid Khoshnevis" <hamid(at)emarq(dot)com>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] null and integer field
Date: 2000-01-20 02:20:09
Message-ID: 18901.948334809@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Hamid Khoshnevis" <hamid(at)emarq(dot)com> writes:
> The content of an integer field when unassigned appears to be different from
> pushing a null into that field. Can someone please explain the difference
> and show me how to push an 'unassigned' into that integer field.

There is no such concept as 'unassigned' in SQL; whatever you are
observing, it's not that. An integer field should indeed be NULL
if it hasn't got a default and you didn't provide a value when you
inserted the tuple.

Can you provide more details about the problem you're having?

regards, tom lane

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Graeme Merrall 2000-01-20 02:42:56 round() and ||
Previous Message Hamid Khoshnevis 2000-01-20 00:57:17 null and integer field