How to update a TINYINT(1) value
Posted by: Tim Brown
Date: October 14, 2014 06:20AM

I am trying to update an existing field in a table. I want to change it from a 0 to a 1. I know I could easily so this in MySQL Workbench, selecting the table, highlighting the row, and click on "Form Editor", but I want to do this via a script. The command line I am trying to use is

UPDATE products SET (products_status = 0) WHERE products_id = 30

The error message I get is:

Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(products_status = 0) WHERE products_id = 30' at line 1

products_status is the TINYINT(1) and products_id is INT(11) . Any help with this would be greatly appreciated.

Options: ReplyQuote


Subject
Written By
Posted
How to update a TINYINT(1) value
October 14, 2014 06:20AM


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.