Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL cursor : add constraint
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
![]() |
![]() |