Click here to Skip to main content
15,905,963 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
What is the meaning of "select 1 as count from tablename" in sql server?
Posted
Comments
MalwareTrojan 4-Mar-13 7:45am    
Downvote. . . It will display that only, I think you you try, rather blindly voting the solutions.

Seems useless, unless you want to get a recordset that consists of '1's with number of records in recordset equal to number of rows in tablename.
 
Share this answer
 
It will Display 1 as a Value and Column name as COUNT, as shown below.

COUNT
----------
1
 
Share this answer
 
This will just return 1 for no.of column which is available in table as output and column name as Count
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900