The count() function always returns a int value type what should you do if you need to count rows from a query which you know will return a value that is too large for an int value type?



The count() function always returns a int value type what should you do if you need to count rows fr..

Answer / Jitender Kumar Yadav

If the result of using the count() function in a database query exceeds the maximum integer limit, you can use bigint or decimal data types instead. You can also consider breaking down your query into smaller parts and combining the results to avoid the issue.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More DB Development Interview Questions

In which database can extended stored procedures be added?

1 Answers  


I HAVE A PI ON COL A THE NEXT DAY I WANT CHANGE THE PI ON COL B? PLS SEND ME THE ANS

1 Answers   IBM,


Explain about the storage and physical database design?

1 Answers  


How to combine two function together?

1 Answers  


To convert IDMS to DB2, how to deal with IDMS occurs and redefined clause?

1 Answers  


agregator gives one to many records or many to one record

1 Answers   IBM,


Write the fastest query to find out how many rows exist in a table?

1 Answers  


Explain about network model?

1 Answers  


Explain about relational database management systems?

1 Answers  


How can you log an error to the server event log from a stored procedure?

1 Answers  


Why does this query return 0?

1 Answers  


What you can do to remove data from the cache and query plans from memory for testing the performance of a query repeatedly?

1 Answers  


Categories