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
 
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?   3
What is a SELECT statement?   1
What are the three DB2 date and time data types and their associated functions?   1
what is the difference between where clause and having clause IBM 2
When DB2 connection fails, will online program work or give errors. Virtusa 1
What do the initials DDL and DML stand for and what is their meaning?   2
What is a clustering index ?   3
I have a subprogram B calling from mainprogram A.I have opened a cursor in A ,Can i fetch the same cursor in subprogram B , If yes , Please explain the reason? HeadStrong 1
What happens to a cursor after a commit?   2
what is contained in the DB2 node lock file? A) data base names B) data base users names C) license keys D) server names Accenture 5
Describe the elements of the SELECT query syntax?   3
what is load and unload in db2 IBM 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