Home | Previous Page | Next Page   The Table Option > Creating or Altering a Table >

The ALTER TABLE Screen

When you select the Alter option on the TABLE menu, the ALTER TABLE prompt and a list of the tables defined in the current database appear, as Figure 45 shows.

Figure 45. The ALTER TABLE Prompt
ALTER TABLE >> 
Enter the table name you wish to alter with the schema editor.

---------------- mydata@mydbserv ------------- Press CTRL-W for Help ------

  customer 
 items
 orders

Enter the name of the table that you want to alter after the prompt or use the arrow keys to highlight the table name in the list. After you press RETURN, the ALTER TABLE menu and the table schema appear, as Figure 46 shows.

Figure 46. The ALTER TABLE Menu
ALTER TABLE clients:   Add   Modify  Drop  Screen  Table_options Constraints Exit
Adds columns to the table above the line with the highlight.

--- Page 1 of 1 --- mydata@mydbserv ----------- Press CTRL-W for Help -----

 Column Name                     Type           Length   Index   Nulls

  customer_num                     Serial         101      Unique  No
 fname                           Char           15               Yes
 lname                           Char           15               Yes
 company                         Char           20               Yes

Important:
You must have the Alter privilege to successfully alter a table. Without the privilege, you can use the menus from the ALTER TABLE screen, but an error results when you attempt to select Build-new-table from the EXIT screen. For references explaining the Alter privilege and other table-level privileges, see page The TABLE Menu .

To use the LOAD statement to insert data into a table, you must have both Insert and Select privileges for the table. You need the Select privilege because DB–Access must read SELECT information about the columns before inserting data into the table. If you do not have the Select privilege, the LOAD command fails and you get error message -272, "No SELECT permission." If you have the Select but not the Insert privilege, you get error -275, "No INSERT permission."

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]