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|
hi i am having .mdf file and .ldf file ..how can i get the all table in my .mdf..plz give solution
I have a website that allows customers to browse and place orders for certain products. I have 2 tables; Customers and Orders. The Customers table holds the customer records and the Orders table holds the orders placed by the customer. Both tables are tied based on the field Cust_ID. Example of the data is shown below: Cust_ID Cust_Name Cust_ID Product Amount Order_Date 1001 John Tan 1001 P-5211 $120.00 2/13/2006 1002 Michael Wong 1001 K-1428 $88.90 1/11/2006 1003 Mary Cheong 1003 C-0923 $82.50 1/27/2006 1004 Ahmad Suffian 1003 K-1428 $88.90 2/2/2006 Write a single SQL statement that extracts all purchase records with the following criteria: 1. Customer names starting with “M” only. 2. Orders placed within the current month only. 3. Amount does not exceed $100.00 The list must be sorted by order date with the latest order showing on top.
9. Write a query to list a new column with the difference in temp of the cities Delhi and Mumbai, Mumbai and Jammu and soon. Consider the following table : City_id City Temp. 1 delhi 40 2 Mumbai 35 3 Jammu 32 4 Pune 18
write a query for list of owner who are having multiple bikes in below table 1 shanker pulsar 2 shanker Honda 3 shanker car 4 Balu pulsar 5 Balu Honda 6 Balu car 7 Shyam pulsar 8 Jaya Honda 9 Deepa car 10 vasu car
If we shrink the Databse and Files, how much size is decreased?
What is the default isolation level of the sql server database?
What is Cross Join
I applied Transactional with updatable subscriptions replication on 2 tables now i want to delete those 2 tables but i cannot delete those tables as replication is running how can i stop replication for those 2 tables(but i don't want to delete those replicated tables but i need to stop the replication) how can i do that
SQL Server Performance Tuning for Stored Procedures & reducing debugging time?
I hav 10 records only one column 1,2,3,4,5......10 now am writing query select max(column name) Then What is The Output
what is cluster and nin-cluster index?
what is the maximum size of sql row in mssql?