Documentation
 
 
 

22.3. Browsing Oracle Data

Using EnterpriseDB Developer Studio, you can browse an Oracle database. Along with this you can execute queries, DDL and DML statements. This can be done by starting a SQL Interactive terminal.

Several operations can be performed on the Oracle database while browsing it. For example a user can view data present in a table. In the following example we will view data from the EMPLOYEES table which is present in the HR schema.

Select the EMPLOYEES table node and right click on it to select the View Data option as shown below.

Once you select the View Data option, the following window will appear.

You can get the same result by executing the following statement in SQL Interactive.

   SELECT * FROM HR.EMPLOYEES;
   

The query will also return the data of all employees present in the HR.EMPLOYEES table as shown above.

Similarly a user can execute DDL or DML statements on an Oracle database. In the following example a new table, EMP, will be created in the HR schema. We will do this by executing the following DDL statement in SQL Interactive window.

   CREATE TABLE HR.EMP (
    empno           NUMBER(4) NOT NULL CONSTRAINT emp_pk PRIMARY KEY,
    ename           VARCHAR2(10),
    job             VARCHAR2(9),
    mgr             NUMBER(4),
    hiredate        DATE,
    sal             NUMBER(7,2) CONSTRAINT emp_sal_ck CHECK (sal > 0),
    comm            NUMBER(7,2),
    deptno          NUMBER(2) CONSTRAINT
);
   

Once we execute the above statements, an EMP table will be created in the HR schema. Now we will populate the above table using the following INSERT statement:

   INSERT INTO HR.EMP VALUES (7369,'SMITH','CLERK',7902,'17-DEC-80',800,NULL,20);
   

We can view the data present by selecting the View Data option or by executing the following statement in SQL Interactive:

   SELECT * FROM HR.EMP;
   

 
 ©2004-2007 EnterpriseDB All Rights Reserved