Entering content frame

Procedure documentation Creating a Database Table Locate the document in its SAP Library structure

Use

You can use SQL Studio to create new database tables in the database to which you are currently logged on. You can use existing database tables or stored SQL Studio objects as a template for new database tables.

Prerequisites

You need to have the necessary user authorizations and the NOT EXCLUSIVE user attribute.

Note

For an explanation of user authorizations and user attributes, see the Users section of the Concepts of the Database System documentation and the Authorization section of the Reference Manual.

Procedure

...

       1.      Choose Catalog Manager ® New ® Table Definition.
A window for defining tables opens.

       2.      To use an existing database table or a saved SQL Studio object as a template for your new database table, choose Table Definition ® Get Table. Select the relevant table or the SQL Studio object, and click OK to confirm.

       3.      Enter a table name.

       4.      Carry out the following steps:

·         Define columns

·         Define column constraints

·         Define foreign key dependencies

·         Define miscellaneous information

       5.      To re-use or edit your table draft later, save it as an SQL Studio object by choosing Table Definition ® Save As.

       6.      Choose Table Definition ® Create Table. The system creates the new table in the database.

       7.      To export the SQL statement for creating the database table to the SQL dialog, choose Table Definition ® Export to SQL Dialog.

 

Note

For information on the syntax of CREATE TABLE statements, see the CREATE TABLE statement section of the Reference Manual.

 

Leaving content frame