The ALTER TABLE syntax is explained thoroughly on section 7.8 on  the manual
pages.

ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...]

alter_specification:
        ADD [COLUMN] create_definition [FIRST | AFTER column_name ]
  or    ADD [COLUMN] (create_definition, create_definition,...)
  or    ADD INDEX [index_name] (index_col_name,...)
  or    ADD PRIMARY KEY (index_col_name,...)
  or    ADD UNIQUE [index_name] (index_col_name,...)
  or    ADD FULLTEXT [index_name] (index_col_name,...)
  or ADD [CONSTRAINT symbol] FOREIGN KEY index_name (index_col_name,...)
            [reference_definition]
  or    ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT}
  or    CHANGE [COLUMN] old_col_name create_definition
  or    MODIFY [COLUMN] create_definition
  or    DROP [COLUMN] col_name
  or    DROP PRIMARY KEY
  or    DROP INDEX index_name
  or    RENAME [TO] new_tbl_name
  or    ORDER BY col
  or    table_options

Regards
Jorge

MySQL Development Team
    __  ___     ____ __   __
   /  |/  /_ __/ __/ __ \/ /   Jorge del Conde <[EMAIL PROTECTED]>
  / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\____/ Mexico City, Mexico
        <___/



----- Original Message -----
From: "Xavi Gracia" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 11, 2001 4:33 AM
Subject: Dropping a field from a table


Hi !

I'm new to the list, new to MYSQL in general, although not to SQL, and i was
wondering if it is possible to drop a field from a table in MYSQL and what
is the correct sintax to drop it.

I have been searching in the Dubois's MySQL book but it didn't told any
about, or at least i didn't found it.

Thanks in advance



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to