数据的更新

#################
#数据的更新 更新列!(删除的是行)
#################

-- 1.update...set...where...

update Product
set sale_price=sale_price*10
where product_type='厨房用具';

#使用null---变成清空 
update Product 
set regist_date=null
where product_id='0008';

-- 2.多列更新  
--  使用逗号对列进行分隔排列 
UPDATE Product   
SET sale_price = sale_price * 10, purchase_price = purchase_price / 2 
WHERE product_type = '厨房用具';

猜你喜欢

转载自blog.csdn.net/kylin_learn/article/details/81138792