Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
7Activity
0 of .
Results for:
No results containing your search query
P. 1
Effective SQL

Effective SQL

Ratings: (0)|Views: 409|Likes:
Published by api-3716083

More info:

Published by: api-3716083 on Oct 18, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

03/18/2014

pdf

text

original

Effective SQL, PL/SQL Using

\u2022Multi-Table Insert
\u2022Data Aggregation
\u2022Merge Statement
\u2022Analytical Functions
\u2022BulkCollect and ForAll

May 2007
Multi-Table Insert
Multi-Table Insert
\u2022INSERT \u2026 SELECT
In a multi table insert, you insert computed rows derived from the rows
returned from the evaluation of a sub query into one or more tables.
Types:

\u2022Unconditional Insert
\u2022Conditional Insert
\u2022Conditional First Insert
\u2022Pivoting Insert

Current Scenario:

INSERT INTO revenue (person,month,revenue)
SELECT person, 'Jan', rev_jan FROM revert UNION ALL
SELECT person, 'Feb', rev_feb FROM revert UNION ALL
SELECT person, \u2018Apr\u2018 ,rev_mar FROM revert ;

With Multi Table Insert:

Insert ALL
into revenue values (person ,'JAN', rev_jan)
into revenue values (person, 'FEB', rev_feb)
into revenue values (person,\u2018 MAR', rev_mar)

Selectperson, rev_jan, rev_feb, rev_mar, rev_apr, rev_may,
rev_jun
fromre vert;

Activity (7)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
TEJASKO liked this
Gadde Ganesh liked this
yoursprabhu liked this
alexandergsam liked this
Siva Prasad liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->