Suggestions for writing MySQL DML sentences
The DML statement does not allow the use of @ number to replace the unreasonable field name: UPDATE table_name SET @ 1=NOW () WHERE @ 2room1
The correct way to write it: UPDATE table_name SET column_name1=NOW () WHERE column_name2=1
UPDATE OR DELETE forbids the unreasonable writing of the LIMIT clause: UPDATE table_name SET column_name1=NOW () WHERE column_name2=1 LIMIT 1
The correct way to write it: UPDATE table_name SET column_name1=NOW () WHERE column_name2=1
The INSERT statement needs to write the unreasonable relationship between the value and the field:
INSERT INTO table_name VALUES (NOW (), DATE_ADD (NOW (), INTERVAL + 1 DAY))
The correct way to write:
INSERT INTO table_name (aisino_create,aisino_modify) VALUES (NOW (), DATE_ADD (NOW (), INTERVAL + 1 DAY))
DML statement uses less uncertain functions: UUID (), RAND (), SYSDATE () and other functions. If there is no special use, please replace them with deterministic functions.