Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why do we use view in sql?

1015


Why join is faster than subquery?

1151


What is a constraint?

1077


Can a primary key be a foreign key?

1075


How to rename a column in the output of sql query?

1119


Why are cursors used?

1164


what tools available for managing mysql server? : Sql dba

1126


Define SQL and state the differences between SQL and other conventional programming Languages?

1258


What is a file delimiter?

1159


Which sql statement is used to delete data from a database?

1001


Explain the the update statement in sql?

1098


How do you write a subquery?

1064


What are the operators used in select statements?

1095


Does postgresql run on the cloud?

1214


What is a system versioned table?

1038