Update Statement Not Generating Syntax Error When Using And Instead Of Comma
I was browsing on MySQL Documentation about the update. See UPDATE Syntax. I found out that the syntax is UPDATE [LOW_PRIORITY] [IGNORE] table_reference SET col_name1={expr1|DE
Solution 1:
SETNAME='123'ANDAddress='456'
is parsed to something like:
SETNAME= ('123' AND (Address = '456'))
which is one comparison and boolean AND
of a string and boolean operands.
So it takes the current row's Address
column value, compares it to a '456'
string and result of the comparison is used as a second operand for AND
like '123' AND false
Post a Comment for "Update Statement Not Generating Syntax Error When Using And Instead Of Comma"