Alter DATABASE

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Angelos

    #1

    Alter DATABASE

    Hello jsut a quick question...
    Is it possible to alter the DATABASE structure after it is CREATED AND
    POPULATED WITH RECORDS.
    For example RENAME fields, Change datatypes etc...
    If not what is the best way of doing it and then restore my data?

    I use MySQL - MyISAM tables
    Thanks!!!


  • Felix Geerinckx

    #2
    Re: Alter DATABASE

    On 03/06/2005, Angelos wrote:
    [color=blue]
    > Hello jsut a quick question...
    > Is it possible to alter the DATABASE structure after it is CREATED
    > AND POPULATED WITH RECORDS.
    > For example RENAME fields, Change datatypes etc...[/color]

    http://dev.mysql.com/doc/mysql/en/data-definition.html

    --
    felix

    Comment

    • Bill Karwin

      #3
      Re: Alter DATABASE

      Angelos wrote:[color=blue]
      > Hello jsut a quick question...
      > Is it possible to alter the DATABASE structure after it is CREATED AND
      > POPULATED WITH RECORDS.
      > For example RENAME fields, Change datatypes etc...[/color]

      Yes, ALTER TABLE can do a lot of changes like this. Subject to
      limitations that you might expect, for example what should it do with
      data if you change a VARCHAR(100) to a VARCHAR(6), or for that matter to
      an INTEGER?

      http://dev.mysql.com/doc/mysql/en/alter-table.html

      Regards,
      Bill K.

      Comment

      Working...