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