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

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL cursor : add constraint

Re: PL/SQL cursor : add constraint

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 15 Dec 1999 08:04:42 -0500
Message-ID: <3e4f5scbl44eqc9ee3u9pv863e12uuut8g@4ax.com>


A copy of this was sent to ulysse51_at_my-deja.com (if that email address didn't require changing) On Wed, 15 Dec 1999 12:21:31 GMT, you wrote:

>hi,
>
>i would like to add constraint like Primary key in q create query
>for the moment i can create my table like this
>
>Myquery :='create table MyTable (F1 varchar2(50), F2 number)
>
>cursor_create := DBMS_SQL.OPEN_CURSOR;
>DBMS_SQL.PARSE(cursor_create,Myquery,dbms_sql.native);
>row_processed := DBMS_SQL.EXECUTE (cursor_create);
>
>it works but when my query is
>Myquery :='create table MyTable (F1 varchar2(50) primary key, F2 number)
>or
>Myquery :='create table MyTable (F1 varchar2(50) constraint u_id
>primary key, F2 number)
>it doesn't work

what does "it doesn't work" mean. whats the error. how are you running this (anonymous block, plsql stored procedure,etc). whats the version.

>thank you for your help
>regards
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Dec 15 1999 - 07:04:42 CST

Original text of this message

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