Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What SQL data type does Oracle assign to "count(*)"?

What SQL data type does Oracle assign to count(*) in a query like select count(*) from table? Does this depend on the count size?

like image 874
Derek Mahar Avatar asked Aug 17 '10 15:08

Derek Mahar


People also ask

What is COUNT (*) as in SQL?

The SQL COUNT() function returns the number of rows in a table satisfying the criteria specified in the WHERE clause. It sets the number of rows or non NULL column values. COUNT() returns 0 if there were no matching rows. Syntax: COUNT(*) COUNT( [ALL|DISTINCT] expression )

What is COUNT (*) used for?

The COUNT function counts the number of cells that contain numbers, and counts numbers within the list of arguments.

What does COUNT (*) SQL function return?

SQL Server COUNT() Function The COUNT() function returns the number of records returned by a select query. Note: NULL values are not counted.

What does select COUNT (*) mean?

COUNT(*) returns the number of rows in a specified table, and it preserves duplicate rows. It counts each row separately. This includes rows that contain null values.


1 Answers

The value is an integer; Oracle only has a NUMBER data type.

like image 122
OMG Ponies Avatar answered Oct 14 '22 09:10

OMG Ponies