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 an exception in pl/sql?
What is native sql query?
Explain the components of sql?
How do I add a database to sql?
Why we use sql profiler?
Which data dictionary views have the information on the triggers that are available in the database?
Mention what are the benefits of pl/sql packages?
Which is better stored procedure or query?
how to convert character strings to numeric values? : Sql dba
What is sql stand for?
What is the primary key?
What are types of exception?
What is sql*loader?
How do I create a sql database?
What is sqlexception in java?