Jump to content


Photo

How do I create a Y/N field in a table?


  • Please log in to reply
2 replies to this topic

#1 Conjurer

Conjurer
  • Members
  • PipPipPip
  • Advanced Member
  • 107 posts

Posted 20 October 2003 - 07:45 PM

I\'ve used a number of databases going back as far as Rbase; but I am new to MySQL and was just trying to create some fields in a table that would be set to either yes or no.

I tried using a type of \"set\" and I got an error back. Do I use \"enum\" instead? Or just text with a size of 1?

#2 BinaryStar

BinaryStar
  • Staff Alumni
  • Advanced Member
  • 74 posts
  • LocationBethlehem, PA

Posted 20 October 2003 - 09:04 PM

you can use char with a size of one.....there are probably other ones you could use but that is what i use..

BS :D

#3 Conjurer

Conjurer
  • Members
  • PipPipPip
  • Advanced Member
  • 107 posts

Posted 20 October 2003 - 09:25 PM

I finally got the \"set\" type to work. I had to put the default value in without a qoute around it, then it took.

Thanks for your help. :wink:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users