Using query analyzer, name 3 ways you can get an accurate
count of the number of records in a table?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about integration services of Microsoft SQL server?

586


What are various ways to enhance the ssrs report?

530


Why use cursor in sql server?

547


What is de-normalization and what are some of the examples of it?

531


What is difference in performance between insert top (n) into table and using top with insert?

534






How many database files are there in sql server 2000?what are they?

577


What is normalization process?

597


what is hash nonclustered index

535


what information is maintained within the msdb database? : Sql server administration

509


how can you find out if the current user is a member of the specified microsoft® windows nt® group or microsoft sql server™ role? : Sql server administration

566


This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?

2013


List the different types of joins?

566


How to insert new line characters into strings?

558


What do you mean by recursive stored procedure?

508


Describe how to use linked server?

541