ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> MainFrame >> IBM MainFrame >> DB2
 
 


 

 
 COBOL interview questions  COBOL Interview Questions (849)
 JCL interview questions  JCL Interview Questions (700)
 CICS interview questions  CICS Interview Questions (448)
 DB2 interview questions  DB2 Interview Questions (668)
 IMS interview questions  IMS Interview Questions (79)
 IDMS interview questions  IDMS Interview Questions (6)
 Natural interview questions  Natural Interview Questions (39)
 ADABAS interview questions  ADABAS Interview Questions (7)
 REXX interview questions  REXX Interview Questions (21)
 Assembler interview questions  Assembler Interview Questions (29)
 CLIST interview questions  CLIST Interview Questions (1)
 QMF interview questions  QMF Interview Questions (4)
 MVS interview questions  MVS Interview Questions (11)
 OS390 interview questions  OS390 Interview Questions (9)
 OS 2 interview questions  OS 2 Interview Questions (0)
 VSAM interview questions  VSAM Interview Questions (177)
 QSAM interview questions  QSAM Interview Questions (3)
 Sysplex interview questions  Sysplex Interview Questions (5)
 IBM MainFrame AllOther interview questions  IBM MainFrame AllOther Interview Questions (128)
Question
Shall i use this query to retrieve first 4 records,

Select empno, sal from emptbl where empno < 5. like this can
we fetch first 100 records?
 Question Submitted By :: DB2
I also faced this Question!!     Answer Posted By  
 
Answer
# 1
Hi.............

No. you cann't use this.
this query will display records less than 5.
not to for first 4 records.

For exm.
Suppose i have duplicate records like
Empno
1
2
1
1
3
4
then it display all the above records.
b'coz these all r less than 5.


Thanks.
 
Is This Answer Correct ?    8 Yes 0 No
Mr. Cooooool
 
Answer
# 2
if empno is a primary key then the records in table are
stored in ascending order of empno. hence we can use empno
< 5 to fetch the first 4 records of table.
There is also a standar query to fetch the first 10/100/200
records as below...
select empno,sal from emptble fetch first 100 rows only;
 
Is This Answer Correct ?    7 Yes 0 No
Madhu T
 
 
 
Answer
# 3
I dont think records are stored in the sorted order of primary key in DB2. It happens only in VSAM! 
Is This Answer Correct ?    2 Yes 0 No
Anju
 

 
 
 
Other DB2 Interview Questions
 
  Question Asked @ Answers
 
In cobol+DB2program if the code of cobol program has changed than i have to do precompilation once again? TCS 6
How does DB2 store NULL physically?   2
Can a unique index have more than one null value? If not, what error code is given if an attempt is made to insert more than one null value?   3
What techniques are used to retrieve data from more than one table in a single SQL statement?   2
What is a DBRM, PLAN ?   2
What are the levels of isolation available with DB2V4   2
What is FREEPAGE and PCTFREE in TABLESPACE creation?   1
What is REORG? When is it used?   4
What keyword does an SQL SELECT statement use for a string search?   2
What is lock escalation?   2
What is the SQL Communications Area and what are some of its key fields?   1
What are the disadvantages of PAGE level lock?   3
 
For more DB2 Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com