sql / beginner
Snippet
Counting Total Table Records using the COUNT Function
The COUNT(*) aggregate function returns the total number of rows in a table, including rows with NULL values. It is commonly used to determine table sizes or count occurrences.
snippet.sql
sql
1
SELECT COUNT(*) FROM orders;
Breakdown
1
SELECT COUNT(*) FROM orders;
Evaluates and returns the aggregate total row count from the orders table.