-
Hi,
I created a procedure to create a table.
Compile it No error found.
Execute my procedure. Successfully.
But there is no table creation.
Can someone tell me What's wrong ?
Should I grant some thing for my self ?
Please help
Thanks
DJ
CREATE OR REPLACE PROCEDURE create_tables AS
vCursor NUMBER;
vTableDescription VARCHAR2(4000);
vCreateString VARCHAR2(100);
vNumber INTEGER;
BEGIN
/*Open the cursor for processing */
vCursor := DBMS_SQL.OPEN_CURSOR;
/* First create column for the table */
vTableDescription := '( c1 VARCHAR2(4000), c2 CHAR(255), c2 NCHAR(256),
c4 LONG, c5 NUMBER, c6 INTEGER, c7 DATE, c8 BLOB,
C9 CLOB)';
/* Create a table statement and parse vTableName */
vCreateString := 'CREATE TABLE TEST_DJ ' || vTableDescription;
DBMS_SQL.PARSE(vCursor, vCreateString, DBMS_SQL.V7);
vNumber := DBMS_SQL.EXECUTE(vCursor);
/* Close the cursor */
DBMS_SQL.CLOSE_CURSOR(vCursor);
EXCEPTION
WHEN OTHERS THEN
/* Close the cursor first, then raise the error */
DBMS_SQL.CLOSE_CURSOR(vCursor);
END create_tables;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|