Informatics Practices

What SQL statement do we use to find the total number of records present in the table Product?

  1. SELECT * FROM PRODUCT;
  2. SELECT COUNT(*) FROM PRODUCT;
  3. SELECT FIND(*) FROM PRODUCT;
  4. SELECT SUM() FROM PRODUCT;

SQL Queries

2 Likes

Answer

SELECT COUNT(*) FROM PRODUCT;

Reason — The SQL statement SELECT COUNT(*) FROM PRODUCT; is used to retrieve the total number of records or rows present in the "PRODUCT" table. The COUNT(*) function counts all rows along with the NULL values in a specified table, and the SELECT keyword is used to fetch data from the database.

Answered By

1 Like


Related Questions