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?

Answers were Sorted based on User's Feedback



how to create table with in the procedure or function?..

Answer / k.l.tharangini

create table using procedure

create procedure test as
begin
EXECUTE IMMEDIATE
'CREATE TABLE emp(empno VARCHAR(10),JOB VARCHAR(10),SAL
NUMBER(10))';
end;

Is This Answer Correct ?    43 Yes 3 No

how to create table with in the procedure or function?..

Answer / 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

More SQL PLSQL Interview Questions

what is the difference between binary_integer and pls_integer

2 Answers   TCS,


How you can copy a file to file content and file to pl/sql table in advance pl/sql?

0 Answers  


what is HASH join?

2 Answers   Genpact, HCL,


What is an exception in PL/SQL? What are the two types of exceptions?

0 Answers  


What is an escape character in sql?

0 Answers  


Do ddl statements need commit?

0 Answers  


What is the difference between left and left outer join?

0 Answers  


How are sql commands classified?

0 Answers  


From an Employee table, how will you display the record which has a maximum salary?

29 Answers   Cap Gemini, Exilant, Synechron,


How do u count no of rows in a table?

8 Answers   CTS,


Can we insert data in view?

0 Answers  


If you want a column to be part of the result set, after which SQL keyword does it belong? 1. SELECT 2. FROM 3. WHERE 4. GROUP BY 5. HAVING

10 Answers   HCL, TCS,


Categories