• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 318
  • Last Modified:

Combine Multiple Alter Statements

How can I combine these multiple statements into 1 alter statement:
ALTER TABLE address DROP INDEX 'zip';
ALTER TABLE address DROP INDEX 'phone';
ALTER TABLE address ADD 'fax' int(10) NOT NULL DEFAULT '0';
ALTER TABLE address ADD 'pobox' int(10) NOT NULL DEFAULT '0';
ALTER TABLE address ADD INDEX 'AddressIndex' ('UserID');

Thanks!
0
interclubs
Asked:
interclubs
1 Solution
 
SharathData EngineerCommented:
You can club all into one statement.
alter table address drop index zip,
                    drop index phone,
                    add fax int(10) not null default 0,
                    add pobox int(10) not null default 0,
                    add index AddressIndex(UserID);

Open in new window

0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now