If you could declare a Foreign Key on two columns in "history" table referencing "master" table, and declare this FK with "ON UPDATE CASCADE" option, then postgres will update status in history table for you whenever you update status in master table. Igor -----Original Message----- From: pgsql-admin-owner@xxxxxxxxxxxxxx [mailto:pgsql-admin-owner@xxxxxxxxxxxxxx] On Behalf Of Jagadeesh Sent: Friday, October 10, 2008 1:12 AM To: pgsql-admin@xxxxxxxxxxxxxx Subject: [ADMIN] can I update multiple table at a time? Hello Gurus, Is it possible to update two table using single sql statement? huh? let me be clear I have table master with state and date field. And in history table I have same fields i.e., state and date. I'm writing an update statement to set 'open' state records to 'closed' state after 7. both table can be joined using id. Any thoughts? Thanks -- Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin