From: | Venkatesh Babu <venkatbabukr(at)yahoo(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Table UPDATE statement |
Date: | 2005-02-25 11:17:47 |
Message-ID: | 20050225111747.7704.qmail@web50409.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello,
I need to update few rows of a table (call it 't') and
need to set just one column col1 (out of around 100
columns... to be exact, our table has 116 columns).
The info about rows to be updated is present in
another table t2. t2 just contains 2 columns (row_key,
new value for col1).
What is the best way to perform update? Can't I give
an update statement like: UPDATE t set
col1=t2.new_col1_val where t1.row_key = t2.row_key
???? I think this kind of support is provided in db2,
but couldn't find how this can be done in postgres.
Thanks,
Venkatesh
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
From | Date | Subject | |
---|---|---|---|
Next Message | Alban Hertroys | 2005-02-25 11:18:42 | Re: basic trigger using OLD not working? |
Previous Message | Terry Lee Tucker | 2005-02-25 11:00:19 | Re: Questions regarding notify processing. |