How to find record count of a table without using count(*) ?

Oracle Apps Interview QuestionsCategory: SQLHow to find record count of a table without using count(*) ?
Questions Master asked 3 years ago
1 Answers
Shailender Thallam Staff answered 3 years ago

There are many ways to find, below are few:
SELECT COUNT(rowid) FROM emp; –takes less time than count(*)

SELECT SUM(1) FROM emp;

SELECT MAX(rownum) FROM dual;

COUNT(PRIMARY KEY)