Re: ENUM() vs TINYINT

2015-09-22 Thread shawn l.green
On 9/21/2015 9:03 AM, Richard Reina wrote: I have a column name quarter which I need to have 5 possible inputs; 1, 2, 3, 4, or OT. Because of the OT possibility I am leaning towards ENUM. Hence, I am also thus considering ENUM('first', 'second', 'third', 'fourth', 'overtime') as the input

Re: ENUM() vs TINYINT

2015-09-21 Thread Jan Steinman
> From: Richard Reina <gatorre...@gmail.com> > > I have a column name quarter which I need to have 5 possible inputs; 1, 2, > 3, 4, or OT. Because of the OT possibility I am leaning towards ENUM. > Hence, I am also thus considering ENUM('first', 'second', 'third',

ENUM() vs TINYINT

2015-09-21 Thread Richard Reina
I have a column name quarter which I need to have 5 possible inputs; 1, 2, 3, 4, or OT. Because of the OT possibility I am leaning towards ENUM. Hence, I am also thus considering ENUM('first', 'second', 'third', 'fourth', 'overtime') as the input will primarily be used in written descriptions

Re: ENUM() vs TINYINT

2015-09-21 Thread Basil Daoust
I'm sure your enum is a fine option, but 0,1,2,3,4 would do the same thing. And you could add a comment to the table to describe it if desired. On Mon, Sep 21, 2015 at 8:03 AM, Richard Reina <gatorre...@gmail.com> wrote: > I have a column name quarter which I need to have 5 possible inp

Re: Possible to get better error handling for invalid enum parameter to stored program?

2009-03-08 Thread Steve Edberg
If you want to keep the enum column, you can set the strict SQL mode: mysql show variables like 'SQL_MODE'; +---+---+ | Variable_name | Value | +---+---+ | sql_mode | | +---+---+ 1 row in set (0.00 sec) mysql create table test2 (test

Re: Possible to get better error handling for invalid enum parameter to stored program?

2009-03-08 Thread David Karr
On Sun, Mar 8, 2009 at 3:31 PM, Steve Edberg sbedb...@ucdavis.edu wrote: If you want to keep the enum column, you can set the strict SQL mode: mysql show variables like 'SQL_MODE'; +---+---+ | Variable_name | Value | +---+---+ | sql_mode

Possible to get better error handling for invalid enum parameter to stored program?

2009-03-06 Thread David Karr
If I define an enum parameter for a stored program, and the calling code sends an invalid value, they get the less than useful data truncated error. Is it possible to define the stored program to produce better error handling for that kind of error? This is probably a FAQ, but in general

Re: Possible to get better error handling for invalid enum parameter to stored program?

2009-03-06 Thread Perrin Harkins
...@gmail.com wrote: If I define an enum parameter for a stored program, and the calling code sends an invalid value, they get the less than useful data truncated error.  Is it possible to define the stored program to produce better error handling for that kind of error? This is probably a FAQ

Re: Possible to get better error handling for invalid enum parameter to stored program?

2009-03-06 Thread David Karr
, you need to use a lookup table and a foreign key constraint. - Perrin On Fri, Mar 6, 2009 at 1:35 PM, David Karr davidmichaelk...@gmail.com wrote: If I define an enum parameter for a stored program, and the calling code sends an invalid value, they get the less than useful data truncated

Re: Relational Databasing on busy webserver (Benchmark of Enum?!)

2008-09-23 Thread Ben A.H.
I figured that was what you meant... I guess my table didn't work (see above message...don't ya' love plaintext :-O)... Has anyone ever tried to benchmark the difference between utilizing ENUMs vs. traditional relational databasing? I would think ENUM is ideal for items I specified

Re: Relational Databasing on busy webserver (Benchmark of Enum?!)

2008-09-23 Thread Micah Stevens
On 09/23/2008 02:42 PM, Ben A.H. wrote: I figured that was what you meant... I guess my table didn't work (see above message...don't ya' love plaintext :-O)... Has anyone ever tried to benchmark the difference between utilizing ENUMs vs. traditional relational databasing? I would think ENUM

Re: SET vs. ENUM

2008-08-01 Thread Martijn Tonies
Hello Jerry and Martijn sets contains an iterator so you can iterate thru the objects also supports the contains method set.contains(new String(foo)) http://www.docjar.com/docs/api/java/util/Set.html Enums must use the exact index and are generally use for fixed constant Array

SET vs. ENUM

2008-07-31 Thread Jerry Schwartz
Other than the fact that an ENUM can have many more values than a SET, is there any particular reason to choose one over the other? Regards, Jerry Schwartz The Infoshop by Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341

Re: SET vs. ENUM

2008-07-31 Thread Martijn Tonies
Jerry, Other than the fact that an ENUM can have many more values than a SET, is there any particular reason to choose one over the other? Well, they are -different things- ... SETs shouldn't be used at all, IMO. ENUM can be somewhat useful, I guess. Martijn Tonies Database Workbench

RE: SET vs. ENUM

2008-07-31 Thread Jerry Schwartz
-Original Message- From: Martijn Tonies [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 9:51 AM To: mysql@lists.mysql.com Subject: Re: SET vs. ENUM Jerry, Other than the fact that an ENUM can have many more values than a SET, is there any particular reason to choose one over

Re: SET vs. ENUM

2008-07-31 Thread Martijn Tonies
Jerry, Other than the fact that an ENUM can have many more values than a SET, is there any particular reason to choose one over the other? Well, they are -different things- ... SETs shouldn't be used at all, IMO. [JS] Why? It goes against normalizing your data, that's why. You

Re: SET vs. ENUM

2008-07-31 Thread Perrin Harkins
On Thu, Jul 31, 2008 at 9:46 AM, Jerry Schwartz [EMAIL PROTECTED] wrote: Other than the fact that an ENUM can have many more values than a SET, is there any particular reason to choose one over the other? The only use for ENUM is to make your data smaller. It offers no protection against

Re: SET vs. ENUM

2008-07-31 Thread Mr. Shawn H. Corey
On Thu, 2008-07-31 at 11:24 -0400, Perrin Harkins wrote: On Thu, Jul 31, 2008 at 9:46 AM, Jerry Schwartz [EMAIL PROTECTED] wrote: Other than the fact that an ENUM can have many more values than a SET, is there any particular reason to choose one over the other? The only use for ENUM

Re: SET vs. ENUM

2008-07-31 Thread Perrin Harkins
On Thu, Jul 31, 2008 at 11:38 AM, Mr. Shawn H. Corey [EMAIL PROTECTED] wrote: I don't see how that can be; with ENUM the DB has to set aside enough bytes for the longest identifier. ENUMs are stored as integers. The only advantage of ENUM is that the data is in the same table; you don't have

RE: SET vs. ENUM

2008-07-31 Thread Jerry Schwartz
-Original Message- From: Martijn Tonies [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 10:32 AM To: mysql@lists.mysql.com Subject: Re: SET vs. ENUM Jerry, Other than the fact that an ENUM can have many more values than a SET, is there any particular reason to choose one

RE: SET vs. ENUM

2008-07-31 Thread Jerry Schwartz
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Perrin Harkins Sent: Thursday, July 31, 2008 11:25 AM To: Jerry Schwartz Cc: mysql@lists.mysql.com Subject: Re: SET vs. ENUM On Thu, Jul 31, 2008 at 9:46 AM, Jerry Schwartz [EMAIL PROTECTED] wrote: Other than the fact that an ENUM

Re: SET vs. ENUM

2008-07-31 Thread Chris W
Jerry Schwartz wrote: [JS] No, you've made several good points. My reasoning is that inexperienced folks using this table through MS Access don't generally understand enough about database design to create the necessary JOINs to do it right. Perhaps the trade-off is a bad one. My thought is

Re: SET vs. ENUM

2008-07-31 Thread Mr. Shawn H. Corey
On Thu, 2008-07-31 at 11:47 -0500, Chris W wrote: My thought is you should develop an application that will give your users the information they need with out direct access to the DB. My thought is, if a user doesn't have a solid understanding of at least 1st and 2nd normal form, and basic

Re: SET vs. ENUM

2008-07-31 Thread Chris W
Mr. Shawn H. Corey wrote: Actually, it's scarier to give access to people who know what they're doing. They're the ones who would know how to sabotage it. Access should only be granted to those who need it to do their jobs. Everyone else should be restricted to using a user interface with

something like ENUM - but it's not ENUM

2007-12-06 Thread Afan Pasalic
hi, I wonder if mysql has something like ENUM() but instead ONLY ONE it could be selected ANY COMBINATION of these offered solutioins? If column is ENUM('a','b','c','d') I can select 'a' or 'b' or 'c' or 'd'. Clear. Tough, I need SOMETHING('a','b','c','d') that I can select 'a' and 'b', or 'b

Re: something like ENUM - but it's not ENUM

2007-12-06 Thread Afan Pasalic
has something like ENUM() but instead ONLY ONE it could be selected ANY COMBINATION of these offered solutioins? If column is ENUM('a','b','c','d') I can select 'a' or 'b' or 'c' or 'd'. Clear. Tough, I need SOMETHING('a','b','c','d') that I can select 'a' and 'b', or 'b', 'c' and 'd', or all of them

Re: Enum issue

2007-01-10 Thread Joerg Bruehe
Hi Olaf, all ! Olaf Stein wrote: Hi All If I have a column `consent` enum('Y','N','P') default NULL, And I try to insert 'NULL' I get this error: Warning: Data truncated for column 'consent' at row 1 What is the problem there? Double-check your command: 'NULL' is a string of four (4

Enum issue

2007-01-09 Thread Olaf Stein
Hi All If I have a column `consent` enum('Y','N','P') default NULL, And I try to insert 'NULL' I get this error: Warning: Data truncated for column 'consent' at row 1 What is the problem there? What I am doing is moving data from one table to another with a python script so I have to assign

Re: Enum issue

2007-01-09 Thread ViSolve DB Team
Hi, Try with, , `consent` enum ('','Y','N','P') , .mysql desc table; +---+--+--+-+-+---+ | Field | Type | Null | Key | Default | Extra | +---+--+--+-+-+---+ . | consent | enum

jdbc question regarding enum

2006-11-01 Thread Jon Drukman
disclaimer: i know nothing about java or jdbc. a co-worker is trying to access a database i've set up using jdbc. he says that my enum column is always returning an integer value instead of the string. obviously this is less than desirable. does anybody have any advice i could give him

Re: too many enum values?

2006-10-04 Thread Jo�o C�ndido de Souza Neto
I think so... Tanner Postert [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] how many is too many? i have a field with 21 possible values. each of the values are only 2 or 3 letter strings, but that seems like a lot, would it be faster/more efficient to put them in a

Re: too many enum values?

2006-10-04 Thread Martijn Tonies
- is this an internally used value/code? If so: enum would be fine - would values only be added during a database upgrade? If so: enum would be fine All in my opinion, of course. Martijn Tonies Database Workbench - development tool for MySQL, and more! Upscene Productions http://www.upscene.com My

too many enum values?

2006-10-03 Thread Tanner Postert
how many is too many? i have a field with 21 possible values. each of the values are only 2 or 3 letter strings, but that seems like a lot, would it be faster/more efficient to put them in a separate table and just join?

Re: enum query results strange.

2006-07-04 Thread John Hicks
Tanner Postert wrote: so i am doing a query on an enum field: when i do this query: select *, id as vid, user_id as uid from video where (file_complete = 'true') order by undt desc limit 0,10; the results are 0.16 or 0.17 seconds. instead of saying file_complete = 'true. if i say

Re: enum query results strange.

2006-07-04 Thread Tanner Postert
The parantheses come from a php function that is writing the statement. i know they aren't needed. I've seen the same results on another table with an enum with values like 'a','b','c','d', so although i haven't modified this specic query to not use the reservered word true. i know the same

Re: enum query results strange.

2006-07-04 Thread Jeremy Cole
Hi, both queries would have the limit on them, so they would only return 10 rows. but yes, there are probably about 10x as many records with true than with anything else. If there are only six possible values, and one values occurs ten times as often as the other five values, that means it

enum query results strange.

2006-07-03 Thread Tanner Postert
so i am doing a query on an enum field: when i do this query: select *, id as vid, user_id as uid from video where (file_complete = 'true') order by undt desc limit 0,10; the results are 0.16 or 0.17 seconds. instead of saying file_complete = 'true. if i say file_complete != to the other 5

Add a new value in an ENUM by manipulate .frm

2006-05-04 Thread Jörgen Winqvist
Hi, I need to add another value in an enum so ALTER TABLE table1 MODIFY Status ENUM('a','b','c') where 'c' is the new value. My problem is that the tables are VERY big and it would take days to alter them all. So, i figure the values in enum:s are in the .frm file so why not change

Re: Add a new value in an ENUM by manipulate .frm

2006-05-04 Thread Barry
Jörgen Winqvist schrieb: Hi, I need to add another value in an enum so ALTER TABLE table1 MODIFY Status ENUM('a','b','c') where 'c' is the new value. My problem is that the tables are VERY big and it would take days to alter them all. Tried it? I also use big tables but adding a field

Re: Add a new value in an ENUM by manipulate .frm

2006-05-04 Thread Jörgen Winqvist
Barry wrote: Jörgen Winqvist schrieb: Hi, I need to add another value in an enum so ALTER TABLE table1 MODIFY Status ENUM('a','b','c') where 'c' is the new value. My problem is that the tables are VERY big and it would take days to alter them all. Tried it? I also use big tables

Re: alter only an enum label

2005-06-17 Thread Jake Peavy
On 6/16/05, Gabriel B. [EMAIL PROTECTED] wrote: If i have a table with about 800M records. and one of the fields is a enum(a, b, c) and i want to change it to enum(a,b,x) My understanding (such as it is) is that the best way to do this is to add a second column with enum('a','b','x') and set

alter only an enum label

2005-06-16 Thread Gabriel B.
If i have a table with about 800M records. and one of the fields is a enum(a, b, c) and i want to change it to enum(a,b,x) will it fall into some optimization and be instant? and what if previously i've never used the c value? isn't there any optimization for that? ...leaving blank labels

RE: alter only an enum label

2005-06-16 Thread Gordon Bruce
If you have c values in the table currently you can just do an ALTER TABLE tablename CHANGE columnname columnname ENUM('a','b','c','x') DEFAULT a NOT NULL then UPDATE tablename SET columname = 'x' WHERE columname = 'c' Then ALTER TABLE tablename CHANGE columnname columnname ENUM('a','b','x

Re: alter only an enum label

2005-06-16 Thread Gabriel B.
hum... clever. i liked that solution. but do have experience on how long it will take with milions of records? all records havin only a int(11) as unique key and the enum field.. suposing now i have enum(a, b) only, and did a ALTER TABLE tablename CHANGE columnname columnname ENUM('a','b','c

RE: alter only an enum label

2005-06-16 Thread Gordon Bruce
CHANGE columnname columnname ENUM('a','b','c') DEFAULT a NOT NULL; LOAD DATA INFILE 'x' INTO TABLE tablename; I know this seems obtuse, but load data infile and select into outfile seem to run very fast and for what ever reason may just be faster than the ALTER TABLE on the fully populated table

Re: ORDER BY and ENUM -- not alphabetical

2005-06-09 Thread alexc
I would say this is not a bug. You declared an enum for the column. So therefore it sorts in enum order. Makes perfect sense. To me MySql is working correctly. If it did not sort an enum in the order declared for the enum then i would be annoyed. Enums are not strings. Declare the column

Re: ORDER BY and ENUM -- not alphabetical

2005-06-09 Thread Felix Geerinckx
Or put the members alphabetically in the enum definition in the first place ... -- felix On 09/06/2005, Eric Bergen wrote: It's not a bug at all. You just hit one of the features of enum :) If you want to order alphabetically as you describe cast the enum name to a string like

Re: ORDER BY and ENUM -- not alphabetical

2005-06-09 Thread Martijn Tonies
Or put the members alphabetically in the enum definition in the first place ... Better yet - drop the ENUM al together :-) Use a lookup table. With regards, Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, Oracle MS SQL Server Upscene Productions http

ORDER BY and ENUM -- not alphabetical

2005-06-08 Thread Daevid Vincent
Please tell me there is a way to fix this bug in mysql Ver 12.22 Distrib 4.0.18, for pc-linux-gnu (i686) I have a column defined like so: Type enum('Schedule','Report','Admin','Search','General','License','Access') If I SELECT, and ORDER BY Type, it is ordering in the order defined

Re: ORDER BY and ENUM -- not alphabetical

2005-06-08 Thread Eric Bergen
It's not a bug at all. You just hit one of the features of enum :) If you want to order alphabetically as you describe cast the enum name to a string like this select col from t order by concat(my_enum); -Eric Daevid Vincent wrote: Please tell me there is a way to fix this bug in mysql

Add an ENUM Column

2005-02-10 Thread shaun thornburgh
Hi, Is it possible to add an ENUM column to a table after it has been created? Thanks -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Add an ENUM Column

2005-02-10 Thread Jay Blanchard
[snip] Is it possible to add an ENUM column to a table after it has been created? [/snip] Yes... http://dev.mysql.com/doc/mysql/en/alter-table.html -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

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: 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

RE: enum TRUE/FALSE

2004-11-10 Thread Scott Hamm
) | | | 1 | | | QADE | enum('null','1') | YES | | NULL | | | DataEntry| enum('null','1') | YES | | NULL | | | QAMR | enum('null','1') | YES | | NULL | | | MailRoom | enum('null','1') | YES

RE: enum TRUE/FALSE

2004-11-10 Thread Chris Blackwell
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 allow NULL, the NULL value is a legal value for the column, and the default value

Re: enum TRUE/FALSE

2004-11-10 Thread SGreen
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 what I said it could hold

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 or IS NOT NULL. I believe that you

RE: enum TRUE/FALSE

2004-11-10 Thread Scott Hamm
I got it made, Active enum('1') works. Thanks everyone! I had to import old database into MySQL with '1','0' as default. I wanted to enumerate it so that I can easily use False/true without altering anything in the current database configurations. -Original Message- From: Jay Blanchard

Re: enum TRUE/FALSE

2004-11-10 Thread Harald Fuchs
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 default value to one of its enumerated values

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

Re: enum TRUE/FALSE

2004-11-10 Thread Michael Stassen
TRUE and FALSE are the integers 1 and 0, respectively. ENUMs hold strings which are assigned numbers starting with 1. That means that WHERE enum_col = TRUE will match rows whose enum_col has the *first* value defined in the ENUM list. Also, every ENUM has the special error value

Re[2]: mysqldump + enum + default + umlaut

2004-10-21 Thread Juri Shimon
Hello miguel, Tuesday, October 19, 2004, 10:52:03 PM, you wrote: ms Hi, ms Thank you for reporting this bug, I already opened the below ms bug report: ms http://bugs.mysql.com/bug.php?id=6165 How to repeat: create table t0 (id int not null auto_increment primary key, foo enum('a','b','o

Re: mysqldump + enum + default + umlaut

2004-10-21 Thread miguel solorzano
enum('a','b','o') default 'o'); http://bugs.mysql.com/bug.php?id=5728 Is this a same bug? According with the user who reported the bug yes. I did the status changes according his answer. Regards, Miguel -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe

Select ENUM values

2004-08-24 Thread Michael Pawlowsky
I'm wondering if there is a better way to select the values of a ENUM field. I have a ENUM field called greeting that has 'Mr.','Mrs.','Ms.','Dr.' in it. I need to put these in a HTML select. Right now I'm doing a SHOW COLUMNS FROM global_lead LIKE 'greeting' and then parsing out the response

Re: Select ENUM values

2004-08-24 Thread Paul DuBois
At 11:51 -0700 8/24/04, Michael Pawlowsky wrote: I'm wondering if there is a better way to select the values of a ENUM field. I have a ENUM field called greeting that has 'Mr.','Mrs.','Ms.','Dr.' in it. I need to put these in a HTML select. Right now I'm doing a SHOW COLUMNS FROM global_lead LIKE

Enum or Int

2004-07-30 Thread Salzgeber Olivier
Hello all I have a table with a field which needs to hold a yes/no or 1/0 value. Which field type is best for this ? Should i create a ENUM field with yes or no values or is it better to create an Int field for this ? What would you recommend ? Best regards Olivier Salzgeber -- MySQL General

Re: Enum or Int

2004-07-30 Thread Cemal Dalar
Olivier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, July 30, 2004 12:48 PM Subject: Enum or Int Hello all I have a table with a field which needs to hold a yes/no or 1/0 value. Which field type is best for this ? Should i create a ENUM field with yes or no values or is it better

Re: Enum or Int

2004-07-30 Thread Michael Dykman
I hope I'm not opening an old can of worms here, but there are some design trade-offs in this decision. ENUM has the strong advantage of being able to constrain the contents to the specific expected values. It is not possible for an application insert an illegal value whereas using INT one would

Re: Enum or Int

2004-07-30 Thread Keith Ivey
Michael Dykman wrote: I hope I'm not opening an old can of worms here, but there are some design trade-offs in this decision. ENUM has the strong advantage of being able to constrain the contents to the specific expected values. It is not possible for an application insert an illegal value

BUG in 4.1.3 SHOW CREATE TABLE: enum vs int

2004-07-03 Thread Juri Shimon
Hello mysql, This bug make impossible to use backup with 'mysqldump','mysql' pair. How-to-repeat: --- drop table if exists t1; drop table if exists t2; create table t1 (a int, b enum('','')) DEFAULT CHARACTER SET cp1251; create table t2 (a int not null, b enum

Re: ENUM vs TINYINT

2004-06-25 Thread Brian Mansell
%3Dc6h60e%252419dd%25241%2540FreeBSD.csie.NCTU.edu.tw%26rnum%3D1 (thread is titled enum or tinyint) I hope that helps! On Thu, 24 Jun 2004 21:17:09 +0300, Cemal Dalar [EMAIL PROTECTED] wrote: Hi all, I need a boolean column and at to this time I always used ENUM('Y','N') for this. I'am

Re: ENUM vs TINYINT

2004-06-25 Thread Tim Brody
AM Subject: Re: ENUM vs TINYINT Cemal, I recall hearing a similar question mentioned in a previous email thread. In fact, here it is: http://groups.google.com/groups?hl=enlr=ie=UTF-8threadm=c6h60e%2419dd%241%40FreeBSD.csie.NCTU.edu.twrnum=1prev=/groups%3Fq%3D%2522enum%2Bor%2Btinyint%2522%26hl

ENUM vs TINYINT

2004-06-24 Thread Cemal Dalar
Hi all, I need a boolean column and at to this time I always used ENUM('Y','N') for this. I'am wondering that will there be a performance difference between using ENUM('Y','N') and TINYINT(1) or BOOLEAN?. And put 0 or 1 to TINYINT column. Best Regards, Cemal Dalar a.k.a Jimmy System

Error 1064 (Syntax error) after adding ENUM or Set types to table definition

2004-05-24 Thread Bartis, Robert M (Bob)
I created the dump file from my current DB to make adjustments and also migrate to Innodb tables. In the process I have tried to add some ENUM types in select table. Obviously, I am doing something wrong as each one give me a syntax error 1064 when I try to source in the text file. I've read

Re: Error 1064 (Syntax error) after adding ENUM or Set types to table definition

2004-05-24 Thread Michael Stassen
One of the tricky things about finding errors is that the error is often earlier than you expect. Mysql points out where it stopped understanding you, but often it's due to something on the line before. That's the case here. There's nothing wrong with your ENUM, but the previous line says

Re: enum or tinyint?

2004-04-27 Thread Michael Stassen
Harald Fuchs wrote: snip Even better, in this case you can use BOOL as the column type. Although that's just a synonym of TINYINT, it makes the intended usage clearer. I suppose, except that mysql (4.0.17, anyway) doesn't remember that you used BOOL. mysql CREATE TABLE bt (flag BOOL); Query OK,

enum or tinyint?

2004-04-25 Thread Arthur Radulescu
What is recommanded for a large database to use enum or tinyint? Should I store active inactive or tinyint (1) with 0 and 1? Thanks, Arthur -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: enum or tinyint?

2004-04-25 Thread Michael Stassen
Arthur Radulescu wrote: What is recommended for a large database to use enum or tinyint? Should I store active inactive or tinyint (1) with 0 and 1? Thanks, Arthur What matters to you, space, speed, or ease of use? A tinyint and an enum with just 2 values both take up one byte, so the space

How to select and set enum by string value

2004-04-03 Thread Eldon Ziegler
I've been unable to select or set an enum field by using the string values. Numeric values work correctly. SHOW CREATE TABLE gives the following: CREATE TABLE `Organizations` ( `OrgID` int(11) NOT NULL auto_increment, `Organization` varchar(50) NOT NULL default

Re: How to select and set enum by string value

2004-04-03 Thread Roger Baklund
* Eldon Ziegler I've been unable to select or set an enum field by using the string values. Numeric values work correctly. SHOW CREATE TABLE gives the following: CREATE TABLE `Organizations` ( `OrgID` int(11) NOT NULL auto_increment, `Organization` varchar(50

Too many columns error when altering column type to ENUM?

2004-02-13 Thread Andrew Iles
I've seen a number of references to the Too many columns error, but I'm encountering something that appears to be different. Basically, I'm trying to change a single column in a table (that has 20 columns) from VARCHAR(255) to ENUM(...) where the enum list contains about 900 entries, each

Re: enum version info

2004-01-15 Thread Victoria Reznichenko
Matthew P Ryder [EMAIL PROTECTED] wrote: Quick question since I can't see to find version information online. What version was enum first supported under? It's supported from 3.21.0: http://www.mysql.com/doc/en/News-3.21.0.html -- For technical support contracts, goto https

enum version info

2004-01-14 Thread Matthew P Ryder
Hi, Quick question since I can't see to find version information online. What version was enum first supported under? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Enum default values

2004-01-05 Thread Richard Dyce
Hi, I'm having problems with setting default values for an enum. It's for a booking system, and I'm keeping track of which day a property starts a booking period. It's useful to have the enum in day order therefore. Omitting the prompts, here's what's happening; * drop table property

RE: Enum default values

2004-01-05 Thread Jay Blanchard
[snip] insert into property values ('','Book-keeper\'s Cottage','Thu'); insert into property values ('','Inglenook Barn','Fri'); insert into property values ('','Maggie\'s House','Fri'); insert into property values ('','Riverside View',''); insert into property values ('','The Manse',''); insert

Re: Enum default values

2004-01-05 Thread Richard Dyce
Jay! Thanks for help with a 'proper' insert. ;-) Yes, the full statement works fine. (I assume this is something like the not setting default values from importing DATA files?) All a bit of a shame, as I'm executing the insert from a PHP script, and was trying to make the routine as generic

Re: Enum default values

2004-01-05 Thread Martijn Tonies
apply. However, shouldn't MySQL raise an exception because '' isn't a valid value for this ENUM specification? With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL MS SQL Server. Upscene Productions http://www.upscene.com -- MySQL General Mailing List

RE: Enum default values

2004-01-05 Thread Jay Blanchard
[snip] Yes, the DEFAULT doesn't apply. However, shouldn't MySQL raise an exception because '' isn't a valid value for this ENUM specification? [/snip] From http://www.mysql.com/doc/en/ENUM.html The value may also be the empty string () or NULL under certain circumstances: If you insert

Re: Enum default values

2004-01-05 Thread Martijn Tonies
[snip] Yes, the DEFAULT doesn't apply. However, shouldn't MySQL raise an exception because '' isn't a valid value for this ENUM specification? [/snip] From http://www.mysql.com/doc/en/ENUM.html The value may also be the empty string () or NULL under certain circumstances: If you

RE: Enum default values

2004-01-05 Thread Jay Blanchard
[snip] If you insert an invalid value into an ENUM (that is, a string not present in the list of allowed values), the empty string is inserted instead as a special error value. This string can be distinguished from a 'normal' empty string by the fact that this string has the numerical value 0

Re: Enum default values

2004-01-05 Thread Martijn Tonies
Hi, [snip] If you insert an invalid value into an ENUM (that is, a string not present in the list of allowed values), the empty string is inserted instead as a special error value. This string can be distinguished from a 'normal' empty string by the fact that this string has

Re: Enum default values

2004-01-05 Thread Michael Stassen
Martijn Tonies wrote: Hi, [snip] If you insert an invalid value into an ENUM (that is, a string not present in the list of allowed values), the empty string is inserted instead as a special error value. This string can be distinguished from a 'normal' empty string by the fact that this string

Re: Enum default values

2004-01-05 Thread Martijn Tonies
Hi, This usually comes up when people expect an exception to be thrown when they assign NULL to a NOT NULL column, but this is the same idea. From the manual http://www.mysql.com/doc/en/constraint_NOT_NULL.html: Indeed. One of those weird MySQL things. Is this different on InnoDB? To be

Re[2]: Enum default values

2004-01-05 Thread Aleksandar Bradaric
Hi, I will now have to supply a field list to the function in addition. Ah well ;-) Maybe this help: insert into `property` values ('', 'Riverside View', default); Take care, Aleksandar -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: Re[2]: Enum default values

2004-01-05 Thread Richard Dyce
Ah ha! Thank you Aleksandar. That's a much better solution. In fact, now youv'e told me this, I looked in the Manual, and the scales where lifted from my eyes. You've saved me re-writing (and re-thinking) a large chunk of PHP. For anyone else's future reference it's all there in plain english

Re: Invalid ENUM values after upgrading from 4.0 to 4.1

2003-12-17 Thread Juri Shimon
with the new 4.1 server, I see question marks (???) for values in ENUM() field type. By the way, I noticed that default values for such fields (when having ``NOT NULL``) display perfectly in Hebrew. Explanation? Is there any specific ``upgrade procedure`` I should do to overcome this problem

Re: Invalid ENUM values after upgrading from 4.0 to 4.1

2003-12-17 Thread Igor Zinkovsky
It's known bug, will be fixed in 4.1.2 - Original Message - From: Juri Shimon [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Noor Dawod [EMAIL PROTECTED] Sent: Wednesday, December 17, 2003 12:37 PM Subject: Re: Invalid ENUM values after upgrading from 4.0 to 4.1 I have the same problem

Invalid ENUM values after upgrading from 4.0 to 4.1

2003-12-16 Thread Noor Dawod
to work with databases, and their tables, that were upgraded from 4.0 with the new 4.1 server, I see question marks (???) for values in ENUM() field type. By the way, I noticed that default values for such fields (when having ``NOT NULL``) display perfectly in Hebrew. Explanation? Is there any

BUGS: MySQL 4.1.1 Internationalization (ENUM)

2003-12-10 Thread Juri Shimon
Hi! create table t(a enum ('','','')); show create table t; CREATE TABLE `t` ( `a` enum('','???','???') default NULL ) TYPE=MyISAM DEFAULT CHARSET=cp1251 and this is a bug! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http

  1   2   3   >