Creating Database Tables

See Also

When connected to a database, you can use the IDE to create tables in a database in the following ways:

To create a new table using the Create Tables dialog:

  1. In the Services window, expand the node for a connected database.
  2. Right-click the Tables node and choose Create Table.
  3. Enter the table name.

    This name must follow conventions for quoted table names in your database. Case is usually significant and you can use spaces. However, it is recommended that table names be entered in upper case and without spaces.

  4. Select the owner of the table from the Owner drop-down menu.

    The dialog box defaults to the schema to which you are connected.

  5. Modify the table with the Add Column and Remove buttons.

    Specify the column type (required) and column size. Column size is optional for some data types.

  6. Specify any additional properties (Optional).
  7. Click OK to create the table.

To grab a table definition:

  1. In the Services window, expand the node for a connected database.
  2. Expand the Tables node, right-click the table you want to re-create and choose Grab Structure.
  3. In the Grab Table dialog box, type a name and navigate to where you want to save the file and click Save.

    When you click Save, a snapshot of the definition of the selected table is saved in the selected location. You can use the snapshot to re-create the table in the current database or in a different database.

To re-create a table from a table definition:

  1. In the Services window, expand the node for a connected database.
  2. Right-click the Tables node (or the node of any table under the Tables node) and choose Recreate Table.
  3. Locate and select the table definition file you want to use to re-create a table.
  4. Specify the table name in the dialog box and click OK to re-create the table. If you want to modify the table definition command, click the Edit table script button and edit the table definition command.

To recreate a table in a different database:

You can save the structure of a table from one database and recreate the table in a different database, even if the two databases have a different SQL syntax. You can thus create database-independent schemas. For example, you can develop a complete application with a database from one vendor and then for deployment, you can transfer the table structures to a different database by a different vendor. You do not need to edit the SQL.

See Also
Executing SQL Statements and Scripts
Browsing Database Structures
Adding Columns to a Database Table

Legal Notices