Re: [GENERAL] Duplicated tables of certain columns

2011-02-21 Thread Yan Cheng CHEOK
Sorry. The table visualize display doesn't look right in the message, as I am using tab instead of space. I fix them. Table unit_11 = unit_id [PK]fk_lot_id status value 1 11 1 100 2 11 1 101 3 1

Re: [GENERAL] Duplicated tables of certain columns

2011-02-21 Thread Vibhor Kumar
On Feb 21, 2011, at 1:39 PM, Yan Cheng CHEOK wrote: > INSERT INTO backup_table SELECT * FROM unit_11 WHERE status = 1; You can try something like, INSERT INTO backup_table select unit_id, 99, status, value from unit_11 where status=1; Thanks & Regards, Vibhor Kumar EnterpriseDB Corporation