我想用当前时间更新我的数据,但为什么在 Mysql 中模拟时仍然出错:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GetDate())) AND (jam_pulang <> (Select GetDate()))' at line 1
下面是我的
UPDATE Presensi SET jam_pulang=(Select GetDate()) WHERE NIP IN(SELECT nip from presensi where faceid=101)and Tanggal in(Select Convert(date, GetDate()));
最佳答案
getdate 不是 mysql 中的函数。
请将 getdate() 编辑为 now()
或 curdate()
关于mysql - 如何在mysql中更新超过2个条件的当前时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50559125/