Answer Posted / parag tyagi
CREATE OR REPLACE PROCEDURE emp_test( in_name VARCHAR2) IS
cnt NUMBER;
BEGIN
EXECUTE IMMEDIATE ('grant create table to user_name');
EXECUTE IMMEDIATE ('create table ' || in_name || '(name
varchar2(10))');
SELECT '1' INTO cnt FROM User_Objects WHERE object_name
= 'EMP_TEST';
IF cnt IS NOT NULL THEN
dbms_output.put_line('Table Created');
END IF;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Name is already used by an existing
object');
END;
| Is This Answer Correct ? | 6 Yes | 6 No |
Post New Answer View All Answers
how to select unique records from a table? : Sql dba
How do I add a primary key to a table?
Can we call a function containing dml statements in a select query?
Explain the commit statement.
What is an emotional trigger?
How insert into statements in sql?
What is sequence in sql?
how many groups of data types? : Sql dba
how many triggers are allowed in mysql table? : Sql dba
how can we submit a form without a submit button? : Sql dba
What is sql partition function?
what is an extent ? : Sql dba
what is error ora-03113: end-of-file on communication channel?
Can we call stored procedure in function?
What is the primary use of normalization?