Answer: 1. Using COUNT(*)
Select count(*) from employee_master;
2. using COUNT(1)
select count(1) from employee_master;
3. Using SUM() aggregate function
select sum(1) from employee_master;
4. Using sysindexes view
select object_name(id), rows from sys.sysindexes where object_name(id) = 'employee_master' and indid<2
5. Using sp_spaceused system SP
exec sp_spaceused 'employee_master;'
Asked In: Many Interviews |
Alert Moderator