Using query analyzer, name 3 ways you can get an accurate
count of the number of records in a table?
Answers were Sorted based on User's Feedback
Answer / kumar.t
1. Select Count(EmployeeId) As NoOfRow From Employee
2. Select Count(*) As NoOfRow From Employee
3. Select Count_Big(*) As NoOfRow From Employee
4. Select Rows From SysIndexes Where Id = Object_Id
('Employee') And IndId<2
By
Kumar.T
Is This Answer Correct ? | 12 Yes | 5 No |
Answer / madhu
To get the total record count of a table use
Select count(*) from table_name
or
select count(column_name) from table_name
Is This Answer Correct ? | 8 Yes | 2 No |
Answer / mathan
1.select count(*) from <table name>
2.select count_big(*) from <table name>
3.select rows from sysindexes where id=?
Is This Answer Correct ? | 7 Yes | 3 No |
Answer / ramakrishna
count()
@@rowcount
sysindexes
dbcc chektable
sp_spaceused
excution plan
Is This Answer Correct ? | 2 Yes | 3 No |
Answer / mahmood
1) Select count(*) from tablename
2) sp_spaceused tablename
3) Select id from sysobjects where name ='tablename'
GO
Select * from sysindexes where id=? ---Put ID no. from
above query
Is This Answer Correct ? | 1 Yes | 4 No |
How can I check that whether automatic statistic update is enabled or not?
What are constraints?
How to Debug a Stored Procedure?
how to find 6th highest salary
What is the use of commit?
Describe triggers features and limitations?
How do I find sql server instance name?
What is the difference between UNIQUE and DISTINCT keywords in DBMS?
Is natural join and equi join same?
write down the sql query? Table Name : emp1 empid empname 1 bala 2 guna Table Name : emp2 empid empname 1 <Null> 2 <Null> Solution : emp1 names are updated in emp2, write a query?
How to create a dml trigger using create trigger statements?
Different Types of Functions ?