MySQL Forums
Forum List  »  Newbie

Boolean column
Posted by: lilian.robert
Date: March 29, 2005 05:38AM

Hi,

I designed my database with a graphical software and I am now encountering a problem for the database creation. I have some boolean columns. For example, I have a table "Worker". Generally, I could know if a worker should pay taxes by calculating his age. But in some situations (marriage etc.), a worker should pay pay taxes even if he is young.

So, in my model, I added a column "payTaxesYN" with a Default value = null. When the payTaxesYN is null, I should calculate his age to know if the worker should pay taxes. When the payTaxesYN is true, the worker should pay, no care about his age, and when payTaxesYN is false, the worker should not pay, no care about his age.

I just realize that mysql (4.1) does not support null values for boolean columns. I red that 0 is false and non zero is true.

Could somebody help me to solve this problem ?

Thank you
Lilian

PS sorry for my poor english

Options: ReplyQuote


Subject
Written By
Posted
Boolean column
March 29, 2005 05:38AM
March 29, 2005 06:40AM
March 29, 2005 08: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.