MySQL Forums
Forum List  »  MySQL Workbench

Noob: UPDATE bits vs text
Posted by: Not Likely
Date: November 23, 2018 03:32AM

Noob problem:

I've run a query which returns the desired results. One column in my table is of BIT type data. I double click on the value I want to change, to select it, then change the 1-to-0 or 0-to-1 and press 'enter' or 'tab' to make the change. I press the Accept button in the bottom right corner of the screen and am shown the code which will update the row(s) I've changed :: HOWEVER...

UPDATE `mySchema`.`myTable` SET `thisColumn`='1' WHERE ...

The value is to be updated with is text, when the column type is BIT, and the UPDATE quietly fails!

Is there a setting somewhere in the Workbench preferences (or elsewhere) to force the auto-magically generated UPDATE query to use the datatype of the column, or, do I have to manually edit the query every time I want to make changes?


Options: ReplyQuote

Written By
Noob: UPDATE bits vs text
November 23, 2018 03:32AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.