Register to Better Coder! It's free.
Enjoy the premium features and succeed at every job interview.

What is a result of SELECT COUNT(*)?

Experience Level: Senior
Tags: DatabasesSQL


The result is 1.

On most databases you can execute the following query: SELECT 1+2. There is no FROM clause yet it still works and returns calculated result 3. Try to think about it as if the database system created a table with zero columns and one row. Then if you execute SELECT Count(*) FROM [ImaginaryTable], the result is 1.


No Comments Yet.
Be the first to tell us what you think.