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
The select into statement is most often used to create backup copies of tables or for archiving records?
What is a sql instance vs database?
Can I copy :old and :new pseudo-records in/to an oracle stored procedure?
What is coalesce in sql?
How to prepare for oracle pl sql certification?
Is sql workbench free?
What are the types of sql commands?
How do I find duplicates in the same column?
What is sql dialect?
How many unique keys can a table have?
what is sql in mysql? : Sql dba
What is data type in database?
What is pl sql quora?
Explain how can you save or place your msg in a table?
What is cross join sql?