# RazorSQL

## Query, Edit, Browse, and Manage Databases

- razorsql.com
- Contact

# Oracle Create Table

The Oracle Create Table Tool allows users to visually create tables. After entering in the table name and the number of columns, the tool allows the user to enter the following information for each column of the table:

Column Name
Column Type (for example, Integer, Char, Varchar, etc.)
Length or Precision
Scale (for decimal columns)
Nullability (whether or not the column accepts null)
Primary Key (whether or not the column is a primary key)
Unique (whether to add a unique constraint to the column)
Default Value (the default value that should be inserted when a null is attempted to be inserted into the column)

After entering the column information, the Create Table Tool can generate and/or execute the SQL needed to create the table.

Listed below is an example of the SQL the Create Table Tool generates for a sample Oracle table.

CREATE TABLE TESTUSER.TEST_TABLE
(COL1 NUMBER NOT NULL,
COL2 CHAR(25),
COL3 VARCHAR2(25),
COL4 NUMBER(10,2),
COL5 DATE,
PRIMARY KEY (COL1),
UNIQUE (COL3))