pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feeddelete queires
4+ messages / 4 participants
[nested] [flat]
* delete queires
@ 2001-10-27 21:13 stephen <stephen.hubbard@btinternet.com>
0 siblings, 3 replies; 4+ messages in thread
From: stephen @ 2001-10-27 21:13 UTC (permalink / raw)
To: pgsql-sql
i was wondering if it's possible to make a delete query to delete only one of the two fields in a table. I have tried only putting that field as the "from" but it still deletes the other field also?
Is there a macro or module code i could use? your help would be much appreciated
regards
Steve
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: delete queires
@ 2001-10-29 16:50 Frank Wiles <frank@wiles.org>
parent: stephen <stephen.hubbard@btinternet.com>
2 siblings, 0 replies; 4+ messages in thread
From: Frank Wiles @ 2001-10-29 16:50 UTC (permalink / raw)
To: stephen <stephen.hubbard@btinternet.com>; +Cc: pgsql-sql
.------[ stephen wrote (2001/10/27 at 22:13:10) ]------
|
| i was wondering if it's possible to make a delete query to delete only one
| of the two fields in a table. I have tried only putting that field as
| the "from" but it still deletes the other field also?
|
| Is there a macro or module code i could use? your help would be much
| appreciated
|
`-------------------------------------------------
No you can't delete a field, delete is only for entire rows.
What you'll want to do is UPDATE the field(s) in question to NULLs.
---------------------------------
Frank Wiles <frank@wiles.org>
http://frank.wiles.org
---------------------------------
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: delete queires
@ 2001-10-29 17:35 Ross J. Reedstrom <reedstrm@rice.edu>
parent: stephen <stephen.hubbard@btinternet.com>
2 siblings, 0 replies; 4+ messages in thread
From: Ross J. Reedstrom @ 2001-10-29 17:35 UTC (permalink / raw)
To: pgsql-sql
On Sat, Oct 27, 2001 at 10:13:10PM +0100, stephen wrote:
> i was wondering if it's possible to make a delete query to delete only one of the two fields in a table. I have tried only putting that field as the "from" but it still deletes the other field also?
Steve,
If I understand your question, you don't want a DELETE, you want an UPDATE,
where you set one field to NULL (or other vaule you're using to indicate
an absence of information).
Examples of what you want to do are always best.
Ross
--
Ross Reedstrom, Ph.D. reedstrm@rice.edu
Executive Director phone: 713-348-6166
Gulf Coast Consortium for Bioinformatics fax: 713-348-6182
Rice University MS-39
Houston, TX 77005
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: delete queires
@ 2001-10-29 17:45 Stephan Szabo <sszabo@megazone23.bigpanda.com>
parent: stephen <stephen.hubbard@btinternet.com>
2 siblings, 0 replies; 4+ messages in thread
From: Stephan Szabo @ 2001-10-29 17:45 UTC (permalink / raw)
To: stephen <stephen.hubbard@btinternet.com>; +Cc: pgsql-sql
On Sat, 27 Oct 2001, stephen wrote:
> i was wondering if it's possible to make a delete query to delete only
> one of the two fields in a table. I have tried only putting that
> field as the "from" but it still deletes the other field also?
AFAIK delete works on entire rows. What is it you want it to do
preciselfy? If you want to set the other value to null, an update
is probably really what you want.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2001-10-29 17:45 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-10-27 21:13 delete queires stephen <stephen.hubbard@btinternet.com>
2001-10-29 16:50 ` Frank Wiles <frank@wiles.org>
2001-10-29 17:35 ` Ross J. Reedstrom <reedstrm@rice.edu>
2001-10-29 17:45 ` Stephan Szabo <sszabo@megazone23.bigpanda.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