Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SELECT COUNT(*) vs. SELECT SINGLE COUNT(*)

Hello gurus,

I simply want to check if at least one records of given where-clause already exists. Is there a difference between above mentioned statements?

Regards,

Alej

replied

the correct solution is SELECT f1 UP TO 1 ROWS !!!!

You should not use COUNT(*), at least on some databases it will count all records fulfilling the condition.

YOU should not use SINGLE, because ... search top entries there are endless discussion on UP TO 1 ROWS and SINGLE

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question