1

I am starting modifying my DB trought Netbeans. I am now creating a new column which must contain a boolean value, and that option is not shown on the Type list for the new coumn. Neither Bool or anything similar to boolean.

Which is the option I must select to create a boolean? I know this could be done with an integer value but as every Status field has been created till now as a Boolean, I'd like to keep it this way.

Netbeans Version 7.4

List

Biomehanika
  • 1,530
  • 1
  • 17
  • 45

1 Answers1

1

Many of the Database vendors do not support the boolean datatype in their implementations for the obvious reasons of 3-values logic: null, true, false which is not very convenient for a 2-logic datatype.

I suggest you use the int datatype treating anything but zero as true, or anything positive as true.

You can find other answers to similar questions here:

Community
  • 1
  • 1
MaVRoSCy
  • 17,747
  • 15
  • 82
  • 125