0% found this document useful (0 votes)
30 views1 page

New Text Document

The document contains SQL statements to backup an existing table, update prices for products containing 'sari roti' in the name, and insert the updated prices back into the original table.

Uploaded by

Sok Keras
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

New Text Document

The document contains SQL statements to backup an existing table, update prices for products containing 'sari roti' in the name, and insert the updated prices back into the original table.

Uploaded by

Sok Keras
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

CREATE TABLE bckprod089879 SELECT * FROM prodmast;

UPDATE prodmast, prodmast_before SET prodmast.price=prodmast_before.price WHERE


merk LIKE '%sari roti%' AND prodmast.prdcd = prodmast_before.prdcd;

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

CREATE TABLE bckprod089879 SELECT * FROM prodmast;


CREATE TABLE bckprodsariroti LIKE prodmast;
INSERT INTO bckprodsariroti SELECT * FROM prodmast_before WHERE merk LIKE '%sari
roti%';
INSERT INTO prodmast.price SELECT price FROM bckprodmastsariroti WHERE
prodmast.prdcd = bckprodsariroti.prdcd;

You might also like