gpt4 book ai didi

MySQL数据库UPDATE LIKE查询错误

转载 作者:太空宇宙 更新时间:2023-11-03 10:57:44 25 4
gpt4 key购买 nike

我正在尝试使用查询更新一行

 update tblstudent a, tmpstudent2013 b set a.dob=b.doa where a.dob like '%2013%' and a.admissionno=b.admissionid;

但它给我错误:不正确的日期时间值“%2013”请帮忙

最佳答案

使用YEAR()

update tblstudent a, tmpstudent2013 b 
set a.dob = b.doa
where year(a.dob) = 2013
and a.admissionno = b.admissionid;

关于MySQL数据库UPDATE LIKE查询错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18824426/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com