What are the ways to get the count of records in a table

0 votes
Hi!!

Can someone tell me the various ways to get the count of records in a table?
Sep 26, 2018 in Database by DataKing99
• 8,130 points
96 views

1 answer to this question.

0 votes

To count the number of records in a table, you can use the below commands:

SELECT * FROM table1

SELECT COUNT(*) FROM table1

SELECT rows FROM sysindexes WHERE id = OBJECT_ID(table1) AND indid < 2

answered Sep 26, 2018 by darklord
• 6,170 points

Related Questions In Database

0 votes
1 answer

What are the ways of Data Import and Export in MySQL Workbench?

There are majorly three ways to export ...READ MORE

answered Dec 14, 2018 in Database by DataKing99
• 8,130 points
220 views
0 votes
1 answer

Query to list number of records in each table in a database

Use the below code to list number of ...READ MORE

answered Oct 11 in Database by Omaiz
• 560 points
32 views
0 votes
1 answer

What are the different types of keys used in the database?

There are mainly 5 types of Keys, ...READ MORE

answered Nov 19, 2018 in Database by darklord
• 6,170 points
106 views
0 votes
1 answer

What are the steps performed by Migration Wizard while migrating a database to MySQL?

The following are the steps  performed by ...READ MORE

answered Dec 10, 2018 in Database by darklord
• 6,170 points
99 views
0 votes
1 answer

How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
2,228 views
0 votes
1 answer

Is it possible to access Couchbase by terminal?

What you want to accomplish isn't possible ...READ MORE

answered Apr 29, 2018 in DevOps & Agile by DareDev
• 6,810 points
51 views
0 votes
1 answer

How to connect Java program to the MySQL database?

You can connect your Java code with ...READ MORE

answered May 11, 2018 in Java by parth295
• 4,640 points
212 views
0 votes
1 answer
0 votes
1 answer

What is the SQL query to get the third highest salary of an employee from employee_table

You can try out something like this: SELECT ...READ MORE

answered Sep 26, 2018 in Database by darklord
• 6,170 points
464 views
0 votes
1 answer

What do ‘Record’, ‘Field’ and ‘Table’ mean in terms of a database?

You can refer to the following definitions ...READ MORE

answered Nov 12, 2018 in Database by darklord
• 6,170 points
54 views