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
|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
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
|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'
Select * from sysindexes where id=? ---Put ID no. from
|Is This Answer Correct ?||1 Yes||4 No|
What is the disadvantage of using subquery exact after a select statement?ex. select (select * from sometable)
What are statistics, under what circumstances they go out of date, how do you update them?
How do you load large data to the SQL server database?
how to implement locking in sql server
How to provide Security for package?
How send email from database?.
i have a table #temp1(id, Name groupname ) and record like this 1 R1 S 2 R3 S 3 R2 S 4 R4 D 5 R5 D 6 R6 K 7 R7 K 8 R8 L 9 R9 L 10 R10 L 11 R11 K and i want to display record based on user defind sorting order e.g. 1 R4 D 2 R5 D 3 R6 K 4 R7 K 5 R11 K 6 R1 S 7 R3 S 8 R2 S 9 R8 L 10 R9 L 11 R10 L
When do you create cluster and noncluster index?
How to work on DTS?what is the main requirement?
What is live lock and deadlock? what is Lock escalation?
2) Consider a Table name A which has below records ID --- 5 5 5 5 5 Consider another table B which has below records ID -- 5 5 5 5 5 5 5 5 How many rows will be returned by each of the below queries a) select * from A inner join B on A.id = b.ID b) select * from A left join B on A.id = b.ID c) select * from A right join B on A.id = b.ID
what is differece between union and union all