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.
New a Table
We click on the icon of blank document in "Schema Browser" to initiate the table creation.
We enter table name and add some more columns for the table in "Columns" tab.
Please note that, we enable the primary key on the first column.
To add more constraints, we can go for "Constraints" tab. Here we add a check constraint for a column.
We leave the check constraint name empty.
Table comment and column comment are all in this tab.
We click "SQL" to preview DDL of the table.
We preview the final result by viewing the DDL before actually creating it.
Click "OK" to confirm the table creation.
We go back to "Schema Browser" to check the result.
We have created a new table in Toad for Oracle.