Pr.Pg Next Pg

Create New Table Using SQL Worksheet in SQL Developer tutorials

 

  • In this section, you create a new table called Account_master1 (Account_master we have already created) in the database demodatabase(which we have already created). You create columns in the Account_master1 table. Your table will have the columns Account_Code, Account_Type, NAME, Add1, Add2, Add3, City, Pin, State, Country and Email. Performing the following steps:

  • Start SQL Developer.
    This procedure varies by platform. In Windows, for example, choose Start > All Programs > Oracle - OraDb11g_home2 > Application Development > SQL Developer.

  • Now Oracle SQL Developer opens.

  • Open that database connection demodatabase_conn. SQL Worksheet display on the right side.

  • Enter the following SQL Statement.

 

CREATE TABLE ACCOUNT_MASTER1

( "ACCOUNT_CODE" VARCHAR2(5 ),

"ACCOUNT_TYPE" VARCHAR2(10 ),

"NAME" VARCHAR2(30 ),

"ADD1" VARCHAR2(30 ),

"ADD2" VARCHAR2(30 ),

"ADD3" VARCHAR2(30 ),

"CITY" VARCHAR2(15 ),

"PIN" NUMBER(10,0),

"STATE" VARCHAR2(15),

"COUNTRY" VARCHAR2(15),

"EMAIL" VARCHAR2(25 )

);

 

  • Now Execute the statement Press F9.

  • Your new table (Account_master1) appears in the list of tables.

  • If you want to view the descriptions of the previously created table Account_master1.

  • Use the following Sql statements:

  • DESCRIBE Account_master1;

 

  • Where DESCRIBE command Provides a description of the specified table.


Pr.Pg border                                              Next Pg