mysql学习打卡day19

今日成果:

update invoices
set payment_total = invoice_total *0.5,payment_date = due_date
where invoice_id = 1;
-- 更新单行记录 

update orders
set comments = '金牌顾客'
where customer_id in (select customer_id from customers where points > 3000);
-- 更新多条记录

delete from invoices
where invoice_id = 1;
-- 删除某条记录

感谢各位读者查阅,欢迎各位点赞✍评论⭐收藏+关注!

你可能感兴趣的:(mysql,学习,数据库)