Altering a table

After a table is created, how you can alter the table depends on your DBMS.

You can always:

You can never:

Some DBMSs let you do the following, but others do not:

NoteDatabase painter is DBMS aware The Database painter grays out or notifies you about actions that your DBMS prohibits.

For complete information about what you can and cannot do when you modify a table in your DBMS, see your DBMS documentation.

StepsTo alter a table:

  1. Highlight the table and select Alter Table from the pop-up menu.

    The table definition displays in the Columns view (this screen shows the Employee table).

    The sample shows the employee table. The Columns view displays columns labeled Column Name, Data Type, Width, D e c, Null, and Default. For each column name in the employee table, the remaining columns display the associated data.
  2. Make the changes you want in the Columns view or in the Object Details view.

  3. Select Save Table or Save Changes.

    PowerBuilder submits the pending SQL syntax statements it generated to the DBMS, and the table is modified.