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 can i insert data inro a table with 3 columns using
FORALL?

Answers were Sorted based on User's Feedback



How can i insert data inro a table with 3 columns using FORALL?..

Answer / ashutosh

you can use 3 different collections for it...

suppose the table is emp have the following columns
1. empname varchar
2. empid number
3. sal number

declare
type name_typ is table of emp.empname%type;
type id_typ is table of emp.empid%type;
type sal_typ is table of emp.sal%type;
name_tab name_typ;
id_tab id_typ;
sal_tab sal_typ;
begin
name_tab := name_typ('ramit','rohan');
id_tab := id_typ(10,20);
sal_tab := sal_typ(21000,22000);
for all i in name_tab.first .. name_tab.last
insert into emp values(name_tab(i),id_tab(i),sal_tab(i));
end;

Is This Answer Correct ?    39 Yes 1 No

How can i insert data inro a table with 3 columns using FORALL?..

Answer / amarnath

in stead of above discription we need to use dynamic sql.

Is This Answer Correct ?    6 Yes 2 No

Post New Answer

More SQL PLSQL Interview Questions

What is rollback?

0 Answers  


why not null constraint showing its constraint type as 'c'

1 Answers  


If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????

0 Answers  


How is Oracle 10g helpful when compared to oracle 9i and what is grid computing

1 Answers   Flextronics,


What packages are available to pl/sql developers?

0 Answers  


How will you debug your procedure? If your procedure is around 2000 lines and the expected output is 10 and we get only output 5.So how will you debug it? Somebody pls give the correct answer?

2 Answers   Fidelity,


How to get employee name from employee table which is the fiveth highest salary of the table

20 Answers   Infosys, Rolta,


If 100 tables are there in user_tables.I want to find in which table zero records are there with table name.Is it possible?

2 Answers  


What are analytical functions in sql?

0 Answers  


What are sql functions? Describe the different types of sql functions?

0 Answers  


Why we use pl sql?

0 Answers  


What is cursor in pl sql with examples?

0 Answers  


Categories