>>>>> "Darren" == Darren Sweeney <[EMAIL PROTECTED]> writes:
Darren> Hi
Darren> I am trying to alter a column within a table but am struggling ..
Darren> The manual tells me to:
Darren> ALTER TABLE tbl_name ALTER COLUMN col_name SET DEFAULT NULL
Darren> which I replace with:
Darren> ALTER TABLE testing ALTER COLUMN itemid SET VARCHAR(32) NOT NULL
Darren> and I get the following:
mysql> ALTER TABLE testing ALTER COLUMN itemid SET VARCHAR(32) NOT NULL;
Darren> ERROR 1064: parse error near 'VARCHAR(32) NOT NULL' at line 1
Darren> Anybody help please ... ??
Hi!
'ALTER COLUMN' can only be used to add or drop default values.
(This is ANSI SQL).
You should instead use the MySQL extension:
ALTER TABLE testing CHANGE COLUMN itemid itemid SET VARCHAR(32) NOT NULL
Yours,
Monty
*************** Warning commercial signature follows **********
If you like TCX's concept of a 'mostly free' database and free
advice, you should at least CONSIDER supporting us that we can
afford to keep this service up. http://www.tcx.se/
-----------------------------------------------------------
Send a mail to [EMAIL PROTECTED] with
unsubscribe mysql [EMAIL PROTECTED]
in the body of the message to unsubscribe from this list.