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
 
how to resolve -818 error. how to see timestamp token in load module and plan IBM 4
why db2 is called as universal database?what is the storage capacity of db2v9 n what are the advantages of db2   3
how to copy the host variables from ps file into cobol program other than include statement Syntel 1
Suppose there are many duplicate records in a Db2 table. What is the query to retrive only duplicate records?   3
What's the maximum number of volumes that can be added to a STOGROUP?   1
how do you resolve -805? HCL 3
Suppose we have a query for update update table1 set col1 = 'val1' where col2=(select .... from ...) suppose the subquery does not return any record, what will happen to update? IBM 1
database DSNDB01 means a.db2 catalog b.db2 directory c.BSDS d.active logs answer with reason please   1
I have a DB2 table which has 1000 rows.after udatingg first 110 rows, my job abends. Now what I have to do if I want to restart the job next time so that it should start updating from 111th row (without updating first 110 rows again). Wipro 10
I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?   2
One program calling 5 subprograms, its a cobol db2 program, after precompilation how many plans and packages will created?   3
What is the function of the Data Manager?   2
 
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