Prueba en línea:
Last active
February 12, 2023 20:43
-
-
Save ojgarciab/a66be8c7408df23c9d996647ca8cafd5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE tbl_order O | |
SET O.total = ( | |
SELECT SUM(OD.quantity*MI.price) | |
FROM tbl_orderdetail OD | |
LEFT JOIN tbl_menuitem MI | |
ON OD.itemID = MI.itemID | |
WHERE OD.orderID = O.orderID | |
) | |
WHERE O.orderID = ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment