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
> 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',
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
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
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
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
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
...@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
, 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
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
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
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
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
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
-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
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
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
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
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
-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
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
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
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
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
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
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
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
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
Hi,
Try with,
, `consent` enum ('','Y','N','P') ,
.mysql desc table;
+---+--+--+-+-+---+
| Field | Type | Null | Key | Default | Extra |
+---+--+--+-+-+---+
.
| consent | enum
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
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
- 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
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?
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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]
[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]
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
[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
) | | | 1 | |
| QADE | enum('null','1') | YES | | NULL | |
| DataEntry| enum('null','1') | YES | | NULL | |
| QAMR | enum('null','1') | YES | | NULL | |
| MailRoom | enum('null','1') | YES
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
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
[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
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
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
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
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
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
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
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
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
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
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
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
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
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
%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
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
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
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
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
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,
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]
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
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
* 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
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
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
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]
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
[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
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
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
[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
[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
[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
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
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
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
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:
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
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
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
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
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 - 100 of 216 matches
Mail list logo