Given table: CREATE TABLE testtab (d_col CHAR(4));

Question 1: It appears that there is no "harm" in just appending
directives onto the alter table command even if the order doesn't make
sense. It appears the parser figures it out... For example...

   ALTER TABLE testtab ADD COLUMN c_col char(4) FIRST,
      ADD COLUMN b_col char(4) FIRST,
      ADD COLUMN a_col char(4) FIRST;

...does end up with a_col then b_col then c_col then d_col... but does
it matter and I doing something wrong?

Question 2: Is that any more efficient than doing...

   ALTER TABLE testtab ADD COLUMN c_col char(4) FIRST;
   ALTER TABLE testtab ADD COLUMN b_col char(4) FIRST;
   ALTER TABLE testtab ADD COLUMN a_col char(4) FIRST;

If it's NOT more efficient then I won't bother rewriting this one app
which runs slowly to join them up because it certain is easier to read
and debug with each modification on its own line.

Thanks!

Matt

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to