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
What is the usage of when clause in trigger?
How do I enable sql encryption?
what are the non-standard sql commands supported by 'mysql'? : Sql dba
How many types of normalization are there?
What are types of exception?
Why is sql*loader direct path so fast?
What is the difference between jpql and sql?
What are the various restrictions imposed on view in terms of dml?
What is primary key and foreign key?
What is a recursive join sql?
what is a cursor? : Sql dba
What is bulk collect in pl sql?
What are the properties of a transaction?
What is the sql case statement?
How to start the command-line sql*plus?