distal-attribute
distal-attribute
distal-attribute
distal-attribute

datos verdadero o falso

afal3d posted 3 years ago in General
hola tengo una tabla con una columna que me gustaría que al momento de seleccionarla me admitiera solo valores verdadero o falso( si o no ) como hago esto.
kalvaro posted 3 years ago
Translated question: can I create a boolean column that will only accept TRUE or FALSE?

You cannot: MySQL does not have such feature (neither booleans nor check constraints). You can create an UNSIGNED TINYINT column and use 0 as false, 1 as true, but MySQL won't prevent you from inserting 2.

(No se puede ya que MySQL no tiene ni campos booleanos ni check constraints).

Please login to leave a reply, or register at first.