Skip to content
Home » Oracle » Toad Create Table Example

Toad Create Table Example

How to create a table in Oracle step by step?

To create a new table, we can choose to compose a hand-writing PL/SQL statement which may be lengthy, complex, and error-prone. Or, we can also use handy GUI tools like Toad for Oracle to reach the goal.

Toad for Oracle is a GUI tool for connecting Oracle, which is mainly used by DBA who want to manage database objects and some schema objects in an easier and visualized way.

In this post, I'd like to illustrate how to create a table in Toad for Oracle step by step. For creating tables in SQL developer, there's a tutorial for you.

Let's see the procedure.

  1. New a Table
  2. Columns
  3. Constraints
  4. Comments
  5. Preview DDL
  6. Table Created

New a Table

We click on the icon of blank document in "Schema Browser" to initiate the table creation.

Toad for Oracle - Create Table - New a Table
Toad for Oracle - Create Table - New a Table

Columns

We enter table name and add some more columns for the table in "Columns" tab.

Toad for Oracle - Create Table - Columns
Toad for Oracle - Create Table - Columns

Please note that, we enable the primary key on the first column.

Constraints

To add more constraints, we can go for "Constraints" tab. Here we add a check constraint for a column.

Toad for Oracle - Create Table - Add Constraint
Toad for Oracle - Create Table - Add Constraint

We leave the check constraint name empty.

Toad for Oracle - Create Table - Check Constraint
Toad for Oracle - Create Table - Check Constraint

Comments

Table comment and column comment are all in this tab.

Toad for Oracle - Create Table - Comments
Toad for Oracle - Create Table - Comments

We click "SQL" to preview DDL of the table.

Preview DDL

We preview the final result by viewing the DDL before actually creating it.

Toad for Oracle - Create Table - DDL
Toad for Oracle - Create Table - DDL

Click "OK" to confirm the table creation.

Toad for Oracle - Create Table - Confirm
Toad for Oracle - Create Table - Confirm

Table Created

We go back to "Schema Browser" to check the result.

Toad for Oracle - Create Table - Table Created
Toad for Oracle - Create Table - Table Created

We have created a new table in Toad for Oracle.

Leave a Reply

Your email address will not be published. Required fields are marked *