Oracle Objects for OLE
Release 9.2

Part Number A95895-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

Executing Data Definition Language (DDL) statements

Data Definition Language (DDL) statements manage schema objects in the database. DDL statements create new tables, drop old tables, and establish other schema objects. They also control access to schema objects. For example:

Set OO4OSession = CreateObject("OracleInProcServer.XOraSession")

Set EmpDb = OO4OSession.OpenDatabase("ExampleDb", "scott/tiger", 0)

EmpDb.ExecuteSQL("create table employees (name VARCHAR2(20),

ssn VARCHAR2(12),

empno NUMBER(6),

mgr NUMBER(6),

salary NUMBER(6)")

EmpDb.ExecuteSQL("GRANT UPDATE, INSERT, DELETE ON employees TO

donna")

EmpDb.ExecuteSQL("REVOKE UPDATE ON employees FROM jamie")

DDL statements also allow you to work with objects in the Oracle database server. For example:

Set OO4OSession = CreateObject("OracleInProcServer.XOraSession")

Set EmpDb = OO4OSession.OpenDatabase("ExampleDb", "scott/tiger", 0)

EmpDb.ExecuteSQL("create type person_t

as object ( name VARCHAR2(30),

ssn VARCHAR2(12),

address VARCHAR2(50))")

EmpDb.ExecuteSQL("create table person_tab OF person_t")


 
Oracle
Copyright © 1994, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback