Creating, Droping, and Editing Tables

This topic describes ways to create, drop, and edit a table in a database with the help of dbForge Fusion.

Creating a Table

  1. Click the New Database Object button on the Devart - Standard toolbar, and specify an object type.
  2. Select the Table type in the dialog.

    New Objects

  3. Enter the table name.
  4. Click Create. If the specified table name is unique, the table editor appears.
  5. Add at least one column to the table.
  6. Optionally, you can alter the table name, change the database (owner), or set a comment for the table.
  7. Save the document.

or

  1. In the Database Explorer window, right-click the Tables folder, and select New Table.
  2. Input the table name.
  3. Add at least one column to the table.
  4. Optionally, alter the name, change the database (owner), or set a comment for the table.
  5. Save the document.

Note

To learn about adding columns, constraints, indexes to the table and defining other table parameters, see Defining Table Structure

Dropping a Table

  1. In the Database Explorer window, expand the Tables folder.
  2. Right-click a required table, and then click Delete in the shortcut menu.

Note

While dropping a table, all its data will be lost.

Editing a Table

Editing a table implies editing its structure: changing, removing, or adding columns, indexes, modifying table options. Table editor allows performing all these actions and viewing changes in the script of the table.

To edit a table and view changes:

  1. In the Database Explorer window, expand the Tables folder.
  2. Right-click a required table, and then click Edit Table.
  3. Select Edit Table from the shortcut menu.
  4. Make necessary changes in the table structure.
  5. Click the Script Changes button to view changes.
  6. To apply changes, click Update Database. If you want to undo all actions made since table document (or any another object editor) was opened or saved, click the Undo button, on the Devart - Standard toolbar. However, you cannot issue the Redo command for database objects, because when you click Undo, a database object is reloaded from server, and all unsaved changes are lost.