Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
SELECT COUNT(*) FROM - iterate over all rows.
SELECT COUNT(id) FROM - iterate over all rows in which the specified field (in this case id ) has a value other than NULL .
What to use is a matter of performance and needs. In the case of primary key , it's more of a performance issue, which will depend on the specific DBMS.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question