Re: enum TRUE/FALSE

2004-11-10 Thread Michael Stassen
ve 3 possible values to compare against in your field (null, empty string, and 1). If you need three values (like: true, false, don't know) then make 3 enum values. But, regardless of the contents of your ENUM list, I would still make an ENUM field as "NOT NULL" and would set its

Re: enum TRUE/FALSE

2004-11-10 Thread Michael Stassen
I think you started with good advice then took a strange turn. Chris Blackwell wrote: If you want an enum to have the possible values of NULL or 1 alter table `Associate` modify `Active` enum('1'); from the mysql manual http://dev.mysql.com/doc/mysql/en/ENUM.html If an ENUM column is declared to a

Re: enum TRUE/FALSE

2004-11-10 Thread Harald Fuchs
ossible > values to compare against in your field (null, empty string, and 1). If > you need three values (like: true, false, don't know) then make 3 enum > values. But, regardless of the contents of your ENUM list, I would still > make an ENUM field as "NOT NULL" a

RE: enum TRUE/FALSE

2004-11-10 Thread Scott Hamm
ssage- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 10:22 AM To: Scott Hamm; 'Mysql ' (E-mail) Subject: RE: enum TRUE/FALSE [snip] mysql> select count(*) from Associate where Active=FALSE; mysql> select count(*) from Associate where Acti

RE: enum TRUE/FALSE

2004-11-10 Thread Jay Blanchard
[snip] mysql> select count(*) from Associate where Active=FALSE; mysql> select count(*) from Associate where Active=TRUE; [/snip] Why don't you set enum('TRUE','FALSE')? I ask this because normally you would query, when using NULL (all caps), WHERE Active IS NULL

Re: enum TRUE/FALSE

2004-11-10 Thread SGreen
need three values (like: true, false, don't know) then make 3 enum values. But, regardless of the contents of your ENUM list, I would still make an ENUM field as "NOT NULL" and would set its default value to one of its enumerated values. That way, the field should only hold w

RE: enum TRUE/FALSE

2004-11-10 Thread Chris Blackwell
Hamm [mailto:[EMAIL PROTECTED] Sent: 10 November 2004 14:25 To: 'Mysql ' (E-mail) Subject: enum TRUE/FALSE I'm trying to figure out how to make Active's null as FALSE and '1' as TRUE, in enum point of view Can anyone help me out here, trying to learn enum

RE: enum TRUE/FALSE

2004-11-10 Thread Scott Hamm
#x27;null','1') | YES | | null | | | Active | enum('null','1') | YES | | NULL | | | Creator | varchar(8) | | || | | NewAssociateDate | date | | | -00-00 | | +------+-

RE: enum TRUE/FALSE

2004-11-10 Thread Jay Blanchard
[snip] I'm trying to figure out how to make Active's null as FALSE and '1' as TRUE, in enum point of view | Active | enum('','1') | YES | | NULL| | [/snip] I have not tested this but have you tried enum('NULL', '1') ? -- MySQL General Mailing List For list archives: http://

enum TRUE/FALSE

2004-11-10 Thread Scott Hamm
I'm trying to figure out how to make Active's null as FALSE and '1' as TRUE, in enum point of view Can anyone help me out here, trying to learn enum's phenomenon? I'm not sure I understood document quite clear -- as of yet :( mysql> desc Associate; +--+--+

RE: True/False data type

2004-11-04 Thread Chris Blackwell
D] Subject: Re: True/False data type Personally I use a tinyint(1) unsigned. Scott Hamm wrote: > What data type should I use to use True/False type when I create a table? > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://

Re: True/False data type

2004-11-04 Thread Michael J. Pawlowsky
Personally I use a tinyint(1) unsigned. Scott Hamm wrote: What data type should I use to use True/False type when I create a table? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: True/False data type

2004-11-04 Thread Jeff Smelser
On Thursday 04 November 2004 02:28 pm, Scott Hamm wrote: > create table account ( > ID int auto_increment, > Date date, > Check_Number int(5), > Bank_Match int enum(0,1), > Category varchar(20) no null, > Credit decimal(7,2), > Debit decimal(7,2), > Balance decimal(7,2), > primary key (ID) > ); It

Re: True/False data type

2004-11-04 Thread Rhino
- Original Message - From: "Scott Hamm" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 04, 2004 3:15 PM Subject: True/False data type > What data type should I use to use True/False type when I create a table? > MySQL 4.1.x includes

RE: True/False data type

2004-11-04 Thread Jay Blanchard
[snip] That page is ambiguous about creating a table with enum... [/snip] A teeny-tiny bit more digging and you would have found it... `Good` enum('true','false') NOT NULL default 'false' -- MySQL General Mailing List For list archives: http://lists.mysql.com

RE: True/False data type

2004-11-04 Thread Scott Hamm
work. -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 3:19 PM To: Scott Hamm; [EMAIL PROTECTED] Subject: RE: True/False data type [snip] What data type should I use to use True/False type when I create a table? [/snip] ENUM http://www.mysq

RE: True/False data type

2004-11-04 Thread Jay Blanchard
[snip] What data type should I use to use True/False type when I create a table? [/snip] ENUM http://www.mysql.com/enum -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

True/False data type

2004-11-04 Thread Scott Hamm
What data type should I use to use True/False type when I create a table? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: True/False

2002-11-08 Thread Daevid Vincent
r N for Yes/No. Or how about "T" or "F" for True/False instead ;-) > Regards, > 'Gbamila > - Original Message - > From: "Tony Roberts" <[EMAIL PROTECTED]> > > > I the past I have used a Boolean data type for True/False, &g

Re: True/False

2002-11-08 Thread Insanely Great
Use enum. Rgds Insane SQLyog - The Definitive Win32 GUI for MySQL http://www.sqlyog.com - Original Message - From: "Tony Roberts" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 08, 2002 4:56 PM Subject: True/False > I am new to MySQL

Re: True/False

2002-11-08 Thread Oluwagbamila Oyekanmi
Use the data type BOOL which takes a 1 or 0 character or use CHAR and then you can use Y or N for Yes/No. Regards, 'Gbamila - Original Message - From: "Tony Roberts" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 08, 2002 12:26 PM Subject:

RE: True/False

2002-11-08 Thread John Meyer
You could use an integer (0 or 1) or an enum with the values 'y' or 'n' -Original Message- From: Tony Roberts [mailto:troberts@;momuk.com] Sent: Friday, November 08, 2002 4:26 AM To: [EMAIL PROTECTED] Subject: True/False I am new to MySQL and I am attempting a ne

True/False

2002-11-08 Thread Tony Roberts
I am new to MySQL and I am attempting a new project to help me learn. I the past I have used a Boolean data type for True/False, Yes/No type data. What data type should be used to achieve the storage of this type of data in MySQL? I have bought the reference manual (a good buy IMHO) but so far