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,100 points
39 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,140 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,100 points
65 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,140 points
42 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,140 points
73 views
0 votes
1 answer

What are the different types of join in SQL?

Hi Suraj, You have a doubt regarding inner join ...READ MORE

answered May 28 in Database by Sampriti
• 620 points
29 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,220 points
1,095 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,670 points
32 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,600 points
99 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,140 points
44 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,140 points
24 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.