Q4. How will you get the count of record without using COUNT verb in query?

Answers were Sorted based on User's Feedback



Q4. How will you get the count of record without using COUNT verb in query?..

Answer / ganesh

select row_number()over() from table_name

Is This Answer Correct ?    8 Yes 5 No

Q4. How will you get the count of record without using COUNT verb in query?..

Answer / sasidharreddy

by using inspect

Is This Answer Correct ?    6 Yes 3 No

Post New Answer

More DB2 Interview Questions

I have a table name Table1 which contain columns Cust_no, car_model, country, salesamt. The records are 101, Fiat, India, 12345 2nd record is 102, Tata, USA, 98743 3rd record is 101, indica, India, 65342 4th record is 103, Toyota, UK, 64522 5th record is 103, Maruti, USA, 98632 and so on..... Now my question is write sql query which will give me detail about the sum of sales amount in perticular country

2 Answers   IBM,


How to resolve -803 sql code in DB2?

3 Answers   Cap Gemini,


What is a buffer in memory?

0 Answers  


Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....

0 Answers  


How we create a tables in DB2 ?Previously client has using 7 letters for user id,now he wants to increase the letters from 7 to 12 for user id.How we can do it?

6 Answers   Wipro,






Can we install 2 different versions of Db2 on same mainframe?

3 Answers  


What are db2 error codes -305 and -407. What is the difference between these 2 error codes ?

1 Answers  


how to resolve -811 sqlcode .give clear explaination

3 Answers   IBM,


Can a array declared with an index be displayed(readable format) in spool?

4 Answers   Syntel, UST,


Hi , I am posting some interview ques . what is the use of cursors ? what is the diff between select and cursor ? bith are used for data retrival .. rite?

2 Answers   Deloitte,


what is the sqlcode -501

5 Answers   IBM, Polaris, Zeus,


What is page size in db2?

0 Answers  


Categories