Can somone tell me what the syntax is for using an ALTER TABLE command to set a mySQL column type to be BINARY?
Can you do it the same way you set a type to be an INTEGER, for example...
If the column field name is column1,
I've tried:
"ALTER TABLE CHANGE column1 column1 BINARY"
Doesn't seem to wotk
thanks,
--Tim
[SOLVED] Code for ALTER TABLE
Moderator: General Moderators
"ALTER TABLE `[table_name]` CHANGE `[current_field_name]` `[new_field_name]` [new_type]( [new_length/value] ) BINARY";
For Example:
For Example:
Code: Select all
ALTER TABLE `cache` CHANGE `mod_title` `mod_title2` VARCHAR( 30 ) BINARY NOT NULL