Jump to content

Archived

This topic is now archived and is closed to further replies.

Conjurer

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

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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:

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.