我正在尝试使用查询更新一行
update tblstudent a, tmpstudent2013 b set a.dob=b.doa where a.dob like '%2013%' and a.admissionno=b.admissionid;
但它给了我错误:不正确的日期时间值“%2013”请帮助
使用年份()
update tblstudent a, tmpstudent2013 b
set a.dob = b.doa
where year(a.dob) = 2013
and a.admissionno = b.admissionid;
尝试 :where YEAR(a.dob) = 2013