Re: inserting a value as null

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Zouari Fourat <fourat(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: inserting a value as null
Date: 2006-02-20 10:57:43
Message-ID: 1140433063.12046.11.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Mon, 2006-02-20 at 11:31 +0100, Zouari Fourat wrote:
> How can i insert or update a value as NULL ?

Use the keyword NULL instead of a constant or variable.

For example:

UPDATE mytable SET mycol = NULL;

--
Oliver Elphick olly(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA 92C8 39E7 280E 3631 3F0E 1EC0 5664 7A2F A543 10EA
========================================
Do you want to know God? http://www.lfix.co.uk/knowing_god.html

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Bruno Wolff III 2006-02-20 14:12:19 Re: Restoring SQL Databse for use in PostgreSQL.
Previous Message Zouari Fourat 2006-02-20 10:31:00 inserting a value as null