pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedDelete COLUMN data
5+ messages / 3 participants
[nested] [flat]
* Delete COLUMN data
@ 2007-08-09 14:26 smiley2211 <smiley2211@yahoo.com>
0 siblings, 3 replies; 5+ messages in thread
From: smiley2211 @ 2007-08-09 14:26 UTC (permalink / raw)
To: pgsql-admin
Hello all,
I need to DELETE all the DATA from 3 columns in my table...what is the BEST
way to handle this??? I don't want to DROP the columns just clear out ALL
the data in those 3 fields...
Thanks...Michelle
--
View this message in context: http://www.nabble.com/Delete-COLUMN-data-tf4242917.html#a12073367
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Delete COLUMN data
@ 2007-08-09 14:37 Sattler, Thomas (IT) <Thomas.Sattler@morganstanley.com>
parent: smiley2211 <smiley2211@yahoo.com>
2 siblings, 1 reply; 5+ messages in thread
From: Sattler, Thomas \(IT\) @ 2007-08-09 14:37 UTC (permalink / raw)
To: smiley2211 <smiley2211@yahoo.com>; +Cc: pgsql-admin
How about:
UPDATE table_name SET column1 = NULL, column2 = NULL, column3 = NULL
> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of smiley2211
> Sent: Thursday, August 09, 2007 10:27 AM
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] Delete COLUMN data
>
>
> Hello all,
>
> I need to DELETE all the DATA from 3 columns in my
> table...what is the BEST way to handle this??? I don't want
> to DROP the columns just clear out ALL the data in those 3 fields...
>
> Thanks...Michelle
> --
> View this message in context:
> http://www.nabble.com/Delete-COLUMN-data-tf4242917.html#a12073367
> Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
--------------------------------------------------------
NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Delete COLUMN data
@ 2007-08-09 14:50 Igor Neyman <ineyman@perceptron.com>
parent: smiley2211 <smiley2211@yahoo.com>
2 siblings, 0 replies; 5+ messages in thread
From: Igor Neyman @ 2007-08-09 14:50 UTC (permalink / raw)
To: smiley2211 <smiley2211@yahoo.com>; pgsql-admin
It is called "update":
UPDATE <table_name> SET <column1> = NULL, <column2> = NULL, <column2> =
NULL;
-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of smiley2211
Sent: Thursday, August 09, 2007 10:27 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] Delete COLUMN data
Hello all,
I need to DELETE all the DATA from 3 columns in my table...what is the
BEST way to handle this??? I don't want to DROP the columns just clear
out ALL the data in those 3 fields...
Thanks...Michelle
--
View this message in context:
http://www.nabble.com/Delete-COLUMN-data-tf4242917.html#a12073367
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Delete COLUMN data
@ 2007-08-09 14:55 smiley2211 <smiley2211@yahoo.com>
parent: smiley2211 <smiley2211@yahoo.com>
2 siblings, 0 replies; 5+ messages in thread
From: smiley2211 @ 2007-08-09 14:55 UTC (permalink / raw)
To: pgsql-admin
hmmm...
I was just thinking...maybe using UPDATE to NULL field value would be an
option....
Update tblname set field1 = NULL;
Thanks...Michelle
smiley2211 wrote:
>
> Hello all,
>
> I need to DELETE all the DATA from 3 columns in my table...what is the
> BEST way to handle this??? I don't want to DROP the columns just clear
> out ALL the data in those 3 fields...
>
> Thanks...Michelle
>
--
View this message in context: http://www.nabble.com/Delete-COLUMN-data-tf4242917.html#a12073910
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Delete COLUMN data
@ 2007-08-09 16:12 smiley2211 <smiley2211@yahoo.com>
parent: Sattler, Thomas (IT) <Thomas.Sattler@morganstanley.com>
0 siblings, 0 replies; 5+ messages in thread
From: smiley2211 @ 2007-08-09 16:12 UTC (permalink / raw)
To: pgsql-admin
THANKS ALL FOR YOUR REPLIES...THIS WORKED JUST FINE.
--
View this message in context: http://www.nabble.com/Delete-COLUMN-data-tf4242917.html#a12075308
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2007-08-09 16:12 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-08-09 14:26 Delete COLUMN data smiley2211 <smiley2211@yahoo.com>
2007-08-09 14:37 ` Sattler, Thomas (IT) <Thomas.Sattler@morganstanley.com>
2007-08-09 16:12 ` smiley2211 <smiley2211@yahoo.com>
2007-08-09 14:50 ` Igor Neyman <ineyman@perceptron.com>
2007-08-09 14:55 ` smiley2211 <smiley2211@yahoo.com>
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