read total employes
EMP Table AS Follows;
EMPID EMPNAME MGRNo MGRNAME
1 Raj Null RAvi
2 Ram 1 Sam
3 ttt 2 ghg
4 Hari 3 Yogi
from the above EMP Table i wan the output as follows
total no of employes 4
Loading

VulpesRank #55 · 29.2K reputationPosted Dec 12, 2012, 7:02 AM EST
SELECT COUNT(*) AS [total no of employees] FROM EMP
JAYRAMRank #7,836 · 233 reputationPosted Dec 12, 2012, 7:17 AM EST
Satyapriya NayakRank #47 · 31.5K reputationPosted Dec 12, 2012, 7:50 AM EST
Bryian TanRank #396 · 6.3K reputationPosted Dec 12, 2012, 12:40 PM EST
Shankar MRank #874 · 2.5K reputationPosted Dec 12, 2012, 7:16 PM EST
What Vulpes said is correct only, Please tell you requirement correctly. In query to get your
expected output try this.
select 'Total No Of Employees : ' + cast (count(*)as varchar) from emp;
Which gets you,
Total No Of Employees : 370