Search Postgresql Archives

Table UPDATE statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux