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:[EMAIL PROTECTED]]
Sent: Saturday, April 06, 2002 7:18 AM
To: [EMAIL PROTECTED]
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
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php