MySQL Forums
Forum List  »  Newbie

How to setup a boolean column in a table
Posted by: Martin McGlensey
Date: July 20, 2015 07:35AM

Hello,

How do I setup a Boolean column in a MySQL table? There is no Boolean data type listed. The book says to use tinyint. Is that correct? Is it tinyint(1) or tinyint? Also 0 is false and any other integer is true. So I set the values to 1 and 0. My app, written in Gambas, says that the column is not a Boolean. So how should I define this column and what should the values be? Maybe -1 and 0. I'm using MySQL/MariaDB 5.5. manipulating the database with Workbench.

All replies are appreciated.

Regards,
Marty

Options: ReplyQuote


Subject
Written By
Posted
How to setup a boolean column in a table
July 20, 2015 07:35AM


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.