Microsoft SQL Server
SQL Server Tutorial, Query's and Interview Questions
Showing posts with label
Three ways to get an accurate count of the number of records in a table?
.
Show all posts
Showing posts with label
Three ways to get an accurate count of the number of records in a table?
.
Show all posts
Tuesday, 21 April 2015
Three ways to get an accurate count of the number of records in a table?
Three ways to get an accurate count of the number of records in a table?
SELECT
*
FROM
table1
SELECT
COUNT
(*)
FROM
table1
SELECT
rows
FROM
sysindexes
WHERE
id
=
OBJECT_ID
(
table1
)
AND
indid
<
2
Older Posts
Home
Subscribe to:
Posts (Atom)