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
Can sql servers linked to other servers like oracle?
What is BCP? When does it used in sql server 2012?
Which are new data types introduced in sql server 2008?
What is stored in the mssqlsystemresource database? : sql server database administration
What are the difference between primary keys and foreign keys?
What is ms sql server triggers?
Give main differences between "Truncate" and "Delete".
Can you please explain the difference between function and stored procedure?
What is the user of Primary key?
What is a trigger? Why we need it?
How to find the version of sql server? : sql server database administration
How to connect to SQL Azure Database by using sqlcmd?
What is cube dimension? : sql server analysis services, ssas
can SSRS reports Cache results?
How to check what was the last restore transaction LSN in Log shipping or Mirroring? when we don't have a Monitor or witness server.