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
What is row_number()?
How do you run a trace?
What is difference between primary key and foreign key?
What is sqlservr.exe - process - sql server (sqlex?press)?
How to create a view with data from multiple tables?
Can you type more than one query in the query editor screen at the same time?
Can we do dml on views?
What is awe?
What are the dmvs? : sql server database administration
What is user-defined function? Explain its types i.e. Scalar and inline table value user-defined function?
How to find Duplicate Records In table?
What is trigger and different types of Triggers?
What is dbcc?
How do you create a clustered index?
Why are views required in the sql server or in any other database?