21 lines
335 B
SQL
21 lines
335 B
SQL
-- 修改测试
|
|
update t_stu
|
|
set sex='男',birthday='1998-02-15'
|
|
where name = '刘红';
|
|
|
|
update t_stu
|
|
set sex='女',birthday='1990-12-28'
|
|
where sid = 1;
|
|
|
|
update t_stu
|
|
-- set birthday=CURDATE()
|
|
set birthday=null
|
|
where sid = 5;
|
|
|
|
/*
|
|
update t_stu
|
|
-- 使用函数加 5 天
|
|
set birthday = DATE_ADD(birthday,INTERVAL 5 DAY)
|
|
where sid = 2;
|
|
*/
|