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?

Thanks.

Options: ReplyQuote


Subject
Views
Written By
Posted
Noob: UPDATE bits vs text
492
November 23, 2018 03:32AM


Sorry, you can't reply to this topic. It has been closed.

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.