PostgreSQL: Update column from another table’s column

Posted Leave a commentPosted in PostgreSQL

UPDATE c_order SET po_refernce_no = (SELECT po_refernce_no FROM “Import” WHERE c_order_id = c_order.c_order_id), tracking_number = (SELECT tracking_number FROM “Import” WHERE c_order_id = c_order.c_order_id)     UPDATE m_product SET manufacturer = (SELECT m_product_po.manufacturer FROM m_product_po WHERE m_product.m_product_id = m_product_po.m_product_id )