IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

db2 intv ques


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthi_ind

Active User


Joined: 24 Feb 2004
Posts: 131
Location: Chennai

PostPosted: Mon Jun 14, 2004 3:13 pm
Reply with quote

hi toall

1) how to retrieve first n records in a table
for example first 5 records

in oracle we hve a option called rowid
but in db2 i hve no idea. how can we retrieve??

2) how can we retrieve rows frm centre i.e frm 9th rec to 14th rec
( is it possible in db2)

3) can anyone explain the db2 precompiler process?
(such as bind,package,collection,dbrm,runtime supervisor,
buffer mgr)


anbudan
karthi G.
Back to top
View user's profile Send private message
ksivapradeep

New User


Joined: 30 Jul 2004
Posts: 95

PostPosted: Wed Sep 15, 2004 9:58 am
Reply with quote

hi karthi,

1) ans: we can retrive the first n recors by FETCH FIRST option.

query: select * from table-name FETCH FIRST n ROWS ONLY

regards,

siva pradeep
Back to top
View user's profile Send private message
harinadh

New User


Joined: 01 Sep 2004
Posts: 18

PostPosted: Thu Sep 30, 2004 12:22 pm
Reply with quote

After Precompilation the output is new source cobol list and DBRM.

DBRM is the collection of SQL statements.

Plan is the compiled form of SQL statements. It contains the optimum path to execute that SQL statements.

Plan is two types one is BIND PLAN and another one is BIND PACKAGE.

FOR BIND PLAN THE INPUT IS MORE THAN ONE DBRM.I.E. PACKAGES...

FOR PACKAGE THE INPUT IS ONLY ONE DBRM.

PLAN IS THE COMPILE FORM OF MORE THAN ONE DBRM. IT MAY BE ONE.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Ques reagrding cursors DB2 2
No new posts interview ques based on SOC7 and Subs... Mainframe Interview Questions 7
No new posts COBOL Interview Ques: About PERFORM l... Mainframe Interview Questions 11
Search our Forums:

Back to Top