how to create table with in the procedure or function?
Answer Posted / vipin kumar
If we need to create a table in the stored procedure then we need to use the execute immediate and then the string ' create table emp(name varcha2(1000))'
Other then this if we need to create a table which will just store the records (collections) then it will be like
--declare a row first
type employee is record
(Emp_name varchar2(100),
emp_id number);
--
-- Create a table now
--
type tab_employee is table of employee
index by binary_integer;
| Is This Answer Correct ? | 4 Yes | 5 No |
Post New Answer View All Answers
Why do we use view in sql?
Why join is faster than subquery?
What is a constraint?
Can a primary key be a foreign key?
How to rename a column in the output of sql query?
Why are cursors used?
what tools available for managing mysql server? : Sql dba
Define SQL and state the differences between SQL and other conventional programming Languages?
What is a file delimiter?
Which sql statement is used to delete data from a database?
Explain the the update statement in sql?
How do you write a subquery?
What are the operators used in select statements?
Does postgresql run on the cloud?
What is a system versioned table?