I'd like to update values in one table based on corresponding values from other tables. Say you want to update prices of pieces provided by one specific manufacturer whose name is in the table Manufacturers
with the Pieces
table containing only the id of the manufacturer.
I've seen several solutions for MySQL here and for MS SQL Server here but none of them seems to work in SQLite.
Any suggestion?
Have you tried something like this?
UPDATE Pieces
SET price = 42
WHERE manufacturer_id = (
SELECT id
FROM Manufacturers
WHERE Name = 'FooBar Inc.'
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With