pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedNULL DATE
5+ messages / 4 participants
[nested] [flat]
* NULL DATE
@ 1998-10-18 20:28 Michel \'ZioBudda\' Morelli <michel@michel.enter.it>
0 siblings, 1 reply; 5+ messages in thread
From: Michel \\'ZioBudda\\' Morelli @ 1998-10-18 20:28 UTC (permalink / raw)
To: pgsql-sql
Hi, I have a item in a table that is a "date". I want to insert a null
value in this item. How can I make it ? Is it possible ?
A SI BIRU
--
Morelli 'ZioBudda' Davide Michel - Member of Pluto Linux User Group
michel@enter.it - http://ziobudda.enter.it/
Linux Problem? Ask to linux@media.dsi.unimi.it
"/dev/ziobudda: access to /var/tmp/beer denied, use /var/adm/pineapple"
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [SQL] NULL DATE
@ 1998-10-18 20:44 ZioBudda <michel@michel.enter.it>
parent: Jan Wieck <jwieck@debis.com>
0 siblings, 2 replies; 5+ messages in thread
From: ZioBudda @ 1998-10-18 20:44 UTC (permalink / raw)
To: Jan Wieck <jwieck@debis.com>; +Cc: pgsql-sql
On Sun, 18 Oct 1998, Jan Wieck wrote:
>
> -- attribute a will have NULL value
> INSERT INTO mytab (b, c) VALUES ('something', 'now');
ok..
but i have the case
INSERT INTO mytab (a,b,c) VALUES(2,'something','now');
now i want to set NULL the date item in this tuple.
A SI BIRI
--
Italian Linux Meeting - http://www.pluto.linux.it/meeting/
--
Morelli 'ZioBudda' Davide Michel - Member of Pluto Linux User Group
michel@enter.it - http://ziobudda.enter.it/
Linux Problem? Ask to linux@media.dsi.unimi.it
"/dev/ziobudda: access to /var/tmp/beer denied, use /var/adm/pineapple"
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [SQL] NULL DATE
@ 1998-10-18 20:56 Jan Wieck <jwieck@debis.com>
parent: Michel \'ZioBudda\' Morelli <michel@michel.enter.it>
0 siblings, 1 reply; 5+ messages in thread
From: jwieck@debis.com @ 1998-10-18 20:56 UTC (permalink / raw)
To: michel@michel.enter.it; +Cc: pgsql-sql
>
> Hi, I have a item in a table that is a "date". I want to insert a null
> value in this item. How can I make it ? Is it possible ?
CREATE TABLE mytab (a int4, b text, c date);
-- attribute a will have NULL value
INSERT INTO mytab (b, c) VALUES ('something', 'now');
-- attribute b will have NULL value
INSERT INTO mytab (a, c) VALUES (2, 'now');
-- attribute c will have NULL value
INSERT INTO mytab (a, b) VALUES (3, 'something else');
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck@debis.com (Jan Wieck) #
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: [SQL] NULL DATE
@ 1998-10-18 21:02 Jan Wieck <jwieck@debis.com>
parent: ZioBudda <michel@michel.enter.it>
1 sibling, 0 replies; 5+ messages in thread
From: jwieck@debis.com @ 1998-10-18 21:02 UTC (permalink / raw)
To: michel@michel.enter.it; +Cc: jwieck@debis.com; pgsql-sql
>
> On Sun, 18 Oct 1998, Jan Wieck wrote:
> >
> > -- attribute a will have NULL value
> > INSERT INTO mytab (b, c) VALUES ('something', 'now');
>
> ok..
> but i have the case
> INSERT INTO mytab (a,b,c) VALUES(2,'something','now');
> now i want to set NULL the date item in this tuple.
>
INSERT INTO mytab (a, b, c) VALUES (2, 'something', NULL);
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck@debis.com (Jan Wieck) #
^ permalink raw reply [nested|flat] 5+ messages in thread
* RE: [SQL] NULL DATE
@ 1998-10-18 21:03 Taral <taral@mail.utexas.edu>
parent: ZioBudda <michel@michel.enter.it>
1 sibling, 0 replies; 5+ messages in thread
From: Taral @ 1998-10-18 21:03 UTC (permalink / raw)
To: ZioBudda <michel@michel.enter.it>; Jan Wieck <jwieck@debis.com>; +Cc: pgsql-sql
> ok..
> but i have the case
> INSERT INTO mytab (a,b,c) VALUES(2,'something','now');
> now i want to set NULL the date item in this tuple.
either:
INSERT INTO mytab (a,b) VALUES (2,''something');
or if it exists already:
UPDATE mytab SET c = NULL;
Taral
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~1998-10-18 21:03 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-10-18 20:28 NULL DATE Michel \'ZioBudda\' Morelli <michel@michel.enter.it>
1998-10-18 20:56 ` Jan Wieck <jwieck@debis.com>
1998-10-18 20:44 ` ZioBudda <michel@michel.enter.it>
1998-10-18 21:02 ` Jan Wieck <jwieck@debis.com>
1998-10-18 21:03 ` Taral <taral@mail.utexas.edu>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox