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 (851)
 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 (80)
 IDMS interview questions  IDMS Interview Questions (6)
 Natural interview questions  Natural Interview Questions (41)
 ADABAS interview questions  ADABAS Interview Questions (8)
 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
 
Where is the access path logic created by the DB2 Optimizer stored?   1
select 100 records from million records ? Verizon 2
In a single table,How to retrieve a employee-id of an employee who works in more than one department? Cap-Gemini 15
if any of the column names is provided wrong, where do you get the error(during precompilation or during Bind)   3
how to copy the host variables from ps file into cobol program other than include statement Syntel 1
what is different three logs in DB2? Syntel 1
Explain an outer join?   1
How would one remove old reorg information from the DB2 catalog?   2
There is a 5000 EMP in company.how we find out the 5th highest getting salary employee outof 5000 employes........ IBM 9
Bind concepts in DB2 cobol Virtusa 10
One program calling 5 subprograms, its a cobol db2 program, after precompilation how many plans and packages will created?   3
What does CURRENTDATA option in bind indicate   1
 
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