Procedure documentationCreating Tables Locate this document in the navigation structure

 

You use the table editor to create a table.

Note Note

You can also use SQL statements instead of the table editor.

More information:

End of the note.

Prerequisites

  • You are logged on to the database as a database user.

  • You have the CREATEIN privilege for the schema in which you want to create the table.

    More information: SQL Reference Manual, Privilege Specification for a Schema (schema_priv_spec)

  • The database is in the ONLINE operational state.

Procedure

  1. Expand the folders of the database user in the Explorer.

  2. In the context menu of the schema, choose   New   Table  .

    More information: Table Editor

  3. Enter the name of the table.

    More information: SQL Reference Manual,

    If you want to use upper and lower case, deactivate the Identifier Upper Case setting in the Database Studio settings.

    More information: Configuring Database Studio

  4. Create columns in the Columns tab.

    More information: Creating Columns

  5. (Optional:) Define constraints for columns in the Constraints tab.

    More information: Defining Constraints for a Column

  6. (Optional:) Create indexes in the Indexes tab.

    More information: Creating Indexes

  7. (Optional:) Define foreign key dependencies in the Foreign Keys tab.

    More information: Defining Foreign Key Dependencies

  8. (Optional:) Enter more table properties in the Miscellaneous tab.

    More information: Defining Custom Table Properties

  9. To save the table in the database, choose Create Table in the context menu of the table editor.

    The current database user becomes the owner of the table. The user obtains the INSERT, UPDATE, DELETE and SELECT privileges for this table.

    If the table is not a temporary table, the owner is also granted the INDEX, REFERENCES, and ALTER privileges.

More Information

SQL Tutorial, Tables