---
title: "How do you get the number of rows affected by query?"  
description: "How do you get the number of rows affected by query?"  
author: "Anonymous User"  
published: 2012-04-09  
updated: 2020-09-17  
canonical: https://www.mindstick.com/interview/1428/how-do-you-get-the-number-of-rows-affected-by-query  
category: "mysql"  
tags: ["mysql"]  
reading_time: 1 minute  

---

# How do you get the number of rows affected by query?

SELECT COUNT (user_id) FROM users would only return the number of user_id’s.

## Answers

### Answer by Anonymous User

SELECT COUNT (user_id) FROM users would only return the number of user_id’s.


---

Original Source: https://www.mindstick.com/interview/1428/how-do-you-get-the-number-of-rows-affected-by-query

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
