Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2011
    Sydney, Australia

    Unanswered: Change column heading in table

    I need to change the name of a column in one of my tables.
    The table is “judge”
    The column is “Address” which needs to change to “Suburb”.

    I’ve looked for answers and come up with:

    alter table judge change address to ‘Suburb’;

    The syntax error indicates it is near ‘to ‘Suburb’’; I’m not even sure I’m using the correct statement. Can you help, please?

  2. #2
    Join Date
    Sep 2009
    San Sebastian, Spain
    This is almost correct. When renaming a column you also need to provide the data type.

    ALTER TABLE judge CHANGE Address Suburb VARCHAR(100);
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    Follow me on Twitter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts