What is the datatype returned by count(*)
Answer Posted / lakshmi narayanan r
It will return INT. Proof is here...
SELECT COUNT(*) AS Total INTO tmpArchiveStoreMaster1 FROM
ArchiveStoreMaster asm
GO
sp_help tmpArchiveStoreMaster1
Name
Owner
Type
Created_datetime
--------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------
------------------------------- -----------------------
tmpArchiveStoreMaster1
dbo
user table 2010-07-06
15:43:05.310
Column_name
Type
Computed Length
Prec Scale Nullable
TrimTrailingBlanks FixedLenNullInSource
Collation
--------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------
----------------------------------- ----------- ----- -----
-----------------------------------
-----------------------------------
-----------------------------------
--------------------------------------------------------------------------------------------------------------------------------
Total
int
no 4
10 0 yes (n/a)
(n/a)
NULL
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Define compound operators?
What are a database and a data warehouse?
How does recursive cte works in sql server?
What are clustered and non-clustered index?
How can we use ConnectorJ JDBC Driver with MS SQL?
How to manipulate data from one table to another table ?
How do you manipulate data?
Can a cursor be updated? If yes, how you can protect which columns are updated?
How do you size a resultset?
When do you think a developer should use sql server-based cursors?
List the advantages of using stored procedures?
What do you understand by hotfixes and patches in sql server?
How to filter records of table in SQL SERVER?
How you can minimize the deadlock situation?
How self join is different from outer join?