081 UPDATE with JOINS

SQL
 

select * from Products

select *
from Products p
join Categories c on p.CategoryId = c.CategoryId
where c.Name = 'Meat'

update p
set p.Price = p.Price * 1.2
from Products p
join Categories c on p.CategoryId = c.CategoryId
where c.Name = 'Meat'

猜你喜欢

转载自blog.csdn.net/KevinHuang2088/article/details/143415930