Question
Which SQL function is used to count the number of rows
in a table?Solution
The COUNT() function in SQL is specifically designed to return the number of rows that match a specified condition. This function can be used to count all rows in a table, rows that satisfy a particular condition, or rows for a specific column. It is one of the aggregate functions in SQL that helps in summarizing data. Option A (SUM()) is incorrect because SUM() is used to calculate the total of a numeric column, not to count rows. Option C (AVG()) is incorrect as it calculates the average value of a numeric column. Option D (MAX()) is incorrect because it returns the maximum value in a specified column. Option E (MIN()) is incorrect since it returns the minimum value in a specified column.
Who is India's Permanent Representative to the UN in Vienna and Chair of the 68th Session of the Commission on Narcotic Drugs (CND)?
Where will the BWF World Championships 2026 be hosted?Â
What is the focus of the ‘Niveshak Shivir’ initiative by IEPFA and SEBI?
What is the estimated capital investment involved in setting up the e-Methanol plant at Kandla Port?Â
What is the primary objective of the new Income Tax Bill approved by the Union Cabinet?
What is the theme of the third Global Hackathon organized by the Reserve Bank of India?
Why did Madhya Pradesh introduce the Drone Promotion and Utilisation Policy 2025?
Where was India’s first cooperative multi-feed Compressed Biogas (CBG) plant inaugurated in October 2025?Â
The Insolvency and Bankruptcy Code (IBC) was enacted in which year?
Under the proposed ITSAR security requirements, which controversial provision has raised concerns?Â