Press "Enter" to skip to content

How to Create Table in Oracle SQL Developer?

Follow these steps to create a table in Oracle SQL developer.

  1. Open Oracle SQL Developer.
  2. Connect to the Database.
  3. On the left side, click on the schema name to expand the node.
  4. Then select Table node and do the right click on it.
  5. Select New Table option from the shortcut menu to create a table.
  6. A Create Table window will appear, as shown in below example.

create table in Oracle SQL developer

  1. In the Create Table window, first, select the Advance checkbox at right to show all options for the table at the left side of the window.
  2. Then select the schema from the Schema drop-down list, by default it is showing the current schema.
  3. Specify the table name in the Name field. As shown in the above image.
  4. Choose the table type from the table type drop-down list.
  5. Then start by specifying columns for the table in the Column section of the window.
  6. Click on the PK column if you want to make the primary key column. Then specify the column name, it’s data type and length, the column can be nullable or not and the default value if any for the column.
  7. Repeat the action for every new column and after completing the column creation, click on the OK button to create the table. You can also use other options in this window, such as Constraints, Indexes, Partitions as per your table requirement.

You have now created a new table using Oracle SQL Developer. The following is an example of the DDL statement for the newly created table.

CREATE TABLE SCOTT.EMP_CONTACT_INFO 
(
EMPNO NUMBER(10) NOT NULL 
, PRIMARY_CONTACT_NO VARCHAR2(20) NOT NULL 
, SECONDRY_CONTACT_NO VARCHAR2(20) 
, ADDR_LINE_1 VARCHAR2(100) NOT NULL 
, ADDR_LINE_2 VARCHAR2(100) 
, CITY VARCHAR2(50) DEFAULT 'UP' NOT NULL 
, STATE VARCHAR2(50) NOT NULL 
, CONSTRAINT EMP_CONTACT_INFO_PK PRIMARY KEY 
(
EMPNO 
)
ENABLE 
);

See also: