Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9053431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:25:13+00:00 2026-06-16T13:25:13+00:00

I was browsing on MySQL Documentation about the update. See UPDATE Syntax . I

  • 0

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|DEFAULT} [, col_name2={expr2|DEFAULT}] ...
    [WHERE where_condition]
    [ORDER BY ...]
    [LIMIT row_count]

When I executed this statement

UPDATE SampleTB
SET NAME = '123' AND Address = '456'
WHERE ID = 1;

See Here for SQL Fiddle Demonstration Link

The query executed successfully and the value of Name was 0. I was expecting a syntax error on the query.

Can somebody explain to me why it didn’t generate an error? And why was the new value of the column is zero and not 123?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T13:25:14+00:00Added an answer on June 16, 2026 at 1:25 pm
    SET NAME = '123' AND Address = '456'
    

    is parsed to something like:

    SET NAME = ('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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After browsing the web I have found out that this code is supposed to
Browsing the Internet, I found the new Ample SDK JavaScript framework. From their about
Browsing through the git documentation, I can't see anything analogous to SVN's commit hooks
after browsing the documentation for the sound classes, it seems there is no way
While browsing I came across this blog post about using the Wikipedia API from
While browsing about changing identity with tor I have the following script: from TorCtl
While browsing MSDN documentation, you may come across this gem: TextBox.Watermark. Awesome! I've been
While browsing SO I sometimes see EOFD for example: ftp -vn <$hostname> <<EOFD Yes
I was browsing SO careers and came across a job that had a pdf
Browsing through the 2.0-wip branch of Twitter Bootstrap, I found LESS have a nice

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.