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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
   
 
Categories  >>  Software  >>  MainFrame  >>  IBM MainFrame  >>  DB2
 
 


 

 
 COBOL interview questions  COBOL Interview Questions
 JCL interview questions  JCL Interview Questions
 CICS interview questions  CICS Interview Questions
 DB2 interview questions  DB2 Interview Questions
 IMS interview questions  IMS Interview Questions
 IDMS interview questions  IDMS Interview Questions
 Natural interview questions  Natural Interview Questions
 ADABAS interview questions  ADABAS Interview Questions
 REXX interview questions  REXX Interview Questions
 Assembler interview questions  Assembler Interview Questions
 CLIST interview questions  CLIST Interview Questions
 QMF interview questions  QMF Interview Questions
 MVS interview questions  MVS Interview Questions
 OS390 interview questions  OS390 Interview Questions
 OS 2 interview questions  OS 2 Interview Questions
 VSAM interview questions  VSAM Interview Questions
 QSAM interview questions  QSAM Interview Questions
 Sysplex interview questions  Sysplex Interview Questions
 IBM MainFrame AllOther interview questions  IBM MainFrame AllOther Interview Questions
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 :: Abuzar
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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?
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
 
  Re: 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?
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
 
 
 
  Re: 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?
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
 
For Read Stability locks are not applicable for phantoms, What is Phantoms?  2
AGGREGATE function support by DB2. A) SUM & AVG B) SUM, MIN & AVG C) SUM, MAX, AVG , MIN &COUNT D) NONE Accenture2
what are the max. & min. no. of partitions allowed in a partition tablespace?  1
What is RUNSTATS?  3
What is a collection?  3
Can any one tell me about Restart logic in DB2.  2
What is FREEPAGE and PCTFREE in TABLESPACE creation?  1
how to resolve -805 . how to see dbrm and package not found IBM2
How would one remove old reorg information from the DB2 catalog?  2
What is the format (internal layout) of ?TIMESTAMP??  1
how we will do null data selection in cobol-db2 program Wipro2
How do you insert a record with a nullable column?  2
 
For more DB2 Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com