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
Determine if oracle date is on a weekend?
What is a clob in sql?
what are the performance and scalability characteristics of mysql? : Sql dba
Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me
What is the basic structure of an sql?
What is restrict in sql?
What is sql*loader and what is it used for? : aql loader
What are the basic techniques of indexing?
What is varchar used for?
What is the difference between a query and a report?
Is nosql relational?
Explain the working of foreign key?
What schema means?
What are sql data types?
what is csv? : Sql dba