Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Syntax Question - CREATE TABLE testtable OF testtype;

Syntax Question - CREATE TABLE testtable OF testtype;

From: barry <bbulsara23_at_hotmail.com>
Date: 27 Oct 2002 04:39:31 -0800
Message-ID: <747f1dec.0210270439.5c5e5b86@posting.google.com>


CREATE OR REPLACE TYPE testtype AS OBJECT (
 id NUMBER(4),
 description VARCHAR2(10)
);
/

CREATE TABLE testtable OF testtype;

What is the syntax to 'CREATE TABLE testtable' such that 'id' is the primary key. I would like to enforce the primary key constraint in the 'CREATE TABLE' statement but alternatively would be happy with enforcing the constraint afterwards in an 'ALTER' type construct.

Can this be done?

Thank you in advance
Barry Received on Sun Oct 27 2002 - 06:39:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US