RE: [PHP-DB] how to change a column to ENUM
| From: | Gurhan Ozen | Date: | Sun, 07 Apr 2002 19:24:26 +0000 |
| Subject: | RE: [PHP-DB] how to change a column to ENUM | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18295@lists.php.net to get a copy of this message | ||
Hi Andy,
That statement won't work because you have to provide the possible values
for the enum colummn. Say you can only have Y or N or that field, that you
need to type:
ALTER TABLE
test CHANGE field field
ENUM('Y','N');
By the way, if you have 250 different possible entries , I would say not to
go with ENUM, but then again it is all depend on you, and your company's
policies.
Gurhan
-----Original Message-----
From: andy [mailto:news.letters@gmx.de]
Sent: Saturday, April 06, 2002 7:18 AM
To: php-db@lists.php.net
Subject: [PHP-DB] how to change a column to ENUM
Hi there,
I did just do a procedure anlyse to my table and figured out that the best
type would be enum.
I tryed:
ALTER TABLE test CHANGE field field ENUM
but I am getting an error: You have an error at your sql sytax at ""
Is this column type even possible, because I have over 2million entries,
while the field has only 250 different values.
Is this type really faster? Currently my structure looks like this:
id medium_int(9)
field1 char50
field2 char2
field3 char2
Field 1 contains about 1.5 million different entries.
Thanx for any help,
Andy
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php