Pr.Pg Next Pg

Create New Table Using the Create Table Dialog Box in SQL Developer tutorials

 

  • In this section, you create a new table called Account_master in the database demodatabase (which we have already created). You create columns in the Account_master 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.

  • Right-click Tables and select New TABLE. Enter Account_master for the Table Name

  • For the first column in your table, enter Account_Code, for the Name, select VARCHAR2 for the Datatype and enter 5 for the size. Select Cannot be NULL, then click Add Column .

  • Note: By checking Cannot be NULL, you are adding a constraint on the table that specifies the column must hold values.

  • For the next column, enter Account_Type for the Name, leave the type as VARCHAR2 and enter 10 for the Size to specify the length of the VARCHAR2. Then click Add Column

  • For the next column, enter Name for the Name, leave the type as VARCHAR2 and enter 30 for the Size to specify the length of the VARCHAR2. Then click Add Column

  • For the next column, enter Add1 for the Name, leave the type as VARCHAR2 and enter 30 for the Size to specify the length of the VARCHAR2. Then click Add Column

  • For the next column, enter Add2 for the Name, leave the type as VARCHAR2 and enter 30 for the Size to specify the length of the VARCHAR2. Then click Add Column

  • For the next column, enter Add3 for the Name, leave the type as VARCHAR2 and enter 30 for the Size to specify the length of the VARCHAR2. Then click Add Column

  • For the next column, enter City for the Name, leave the type as VARCHAR2 and enter 15 for the Size to specify the length of the VARCHAR2. Then click Add Column

  • For the next column, enter Pin for the Name, leave the type as NUMBER and enter 10 for the Size to specify the length of the NUMBER. Then click Add Column

  • For the next column, enter State for the Name, leave the type as VARCHAR2 and enter 15 for the Size to specify the length of the VARCHAR2. Then click Add Column

  • For the next column, enter Country for the Name, leave the type as VARCHAR2 and enter 15 for the Size to specify the length of the VARCHAR2. Then click Add Column

  • For the next column, enter Email for the Name, leave the type as VARCHAR2 and enter 25 for the Size to specify the length of the VARCHAR2. Then click Add Column

  • Now Click OK to create the table.

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


 

Pr.Pg border                                              Next Pg