Re: UPDATE statement
Sergei Golubchik <[email protected]>
| Newsgroups | gmane.comp.db.mysql.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi! On Aug 12, Tino Mariп n (ViTi) wrote: > Dear Sir/Madam, > > I?ve got a very annoying problem with the UPDATE statement. > I?m using ASP.NET, MySQL and for the connection I use the > Microsoft.Data.ODBC reference. > A couple of times I typed the UPDATE statement look the following: > > UPDATA <TABLE> SET <FIRSTFILED> = <FIRSTVALUE> AND <SECONDFIELD> = > <SECONDVALUE> WHERE ? > > Off course, the statement is incorrect, while ?AND? must be replaced by > ?,? but I don?t get any error , why is that? Because <FIRSTVALUE> AND <SECONDFIELD> = <SECONDVALUE> is legal expression, so your statement is understood as <FIRSTFILED> = (<FIRSTVALUE> AND <SECONDFIELD> = <SECONDVALUE>) So, your statement is syntaxically correct, even if it does not do what one would expect :) Regards, Sergei -- __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik <[email protected]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany <___/ www.mysql.com -- MySQL Bugs Mailing List For list archives: http://lists.mysql.com/bugs To unsubscribe: http://lists.mysql.com/[email protected]