-- 更新学生的电话号码
UPDATE personal_info
SET phone = '13800138001'
WHERE student_id = 'S001';

-- 更新教练的电子邮件
UPDATE personal_info
SET email = 'wangwu_new@example.com'
WHERE info_id = (
    SELECT personal_info_id FROM coach WHERE coach_id = 'C001'
);

-- 更新预约的状态
UPDATE appointment
SET status = '已完成'
WHERE appointment_id = 1;

-- 更新场地的容量
UPDATE venue
SET capacity = 60
WHERE venue_id = 1;

-- 更新反馈的内容
UPDATE feedback
SET content = '非常好的一次训练体验！'
WHERE feedback_id = 1;

-- 更新发票的金额
UPDATE invoice
SET amount = 1600.00
WHERE invoice_id = 1;

-- 更新训练记录的反馈内容
UPDATE training_record
SET feedback = '继续保持进步！'
WHERE record_id = 1;

-- 更新账户的状态
UPDATE account
SET status = '停用'
WHERE account_id = 'S001';

-- 更新预约的时间段
UPDATE appointment
SET period = '下午'
WHERE appointment_id = 2;

-- 更新教练的密码
UPDATE coach
SET password = 'newcoachpass2'
WHERE coach_id = 'C002';

-- 删除特定的学生
DELETE FROM student WHERE student_id = 'S007';
DELETE FROM personal_info WHERE student_id = 'S007';
DELETE FROM account WHERE account_id = 'S007';

-- 删除特定的教练
DELETE FROM coach WHERE coach_id = 'C007';
DELETE FROM personal_info WHERE info_id = (
    SELECT personal_info_id FROM coach WHERE coach_id = 'C007'
);
DELETE FROM account WHERE account_id = 'C007';

-- 删除特定的预约
DELETE FROM appointment WHERE appointment_id = 3;

-- 删除特定的场地
DELETE FROM venue WHERE venue_id = 6;

-- 删除特定的反馈
DELETE FROM feedback WHERE feedback_id = 5;

-- 删除特定的发票
DELETE FROM invoice WHERE invoice_id = 6;
-- 删除特定的训练记录
DELETE FROM training_record WHERE record_id = 7;

-- 删除特定的账户
DELETE FROM account WHERE account_id = 'S007';

-- 删除特定的预约时间段
DELETE FROM booking_slot WHERE slot_id = 8;

-- 删除特定的个人基本信息
DELETE FROM personal_info WHERE info_id = 7;



