Procedure documentationCreating Tables Locate this document in the navigation structure

 

You use the table editor to create a table.

Note Note

To create tables, 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. In the explorer tree, expand the folders of the database user who is to be the owner of the table.

  2. Select the schema under which you want to create the table.

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

    More information: Table Editor

  4. Enter the name of the table.

    More information: SQL Reference Manual,

    Note Note

    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

    End of the note.
  5. On the Columns page, create columns.

    More information: Creating Columns

  6. Optional: On the Constraints tab page, define constraints for columns.

    More information: Defining Constraints for a Column

  7. Optional: On the Indexes tab page, create indexes.

    More information: Creating Indexes

  8. Optional: On the Foreign Keys tab page, define foreign key dependencies.

    More information: Defining Foreign Key Dependencies

  9. Optional: On the Miscellaneous tab page, enter further table properties.

    More information: Defining Custom Table Properties

  10. 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