# RowsAffected proc (database query)

Source: https://ref.dm-lang.org/database/query/proc/RowsAffected
Added in BYOND 506.

### Format
> `RowsAffected()`

After running Execute() on a query that changes rows in the database (for instance, an UPDATE query), this proc returns the number of rows that were changed. This can be useful if you need to know whether a query actually did anything.

### See also
- [database datum](https://ref.dm-lang.org/database/index.md)
- [database query datum](https://ref.dm-lang.org/database/query/index.md)
- [Execute proc (database query)](https://ref.dm-lang.org/database/query/proc/Execute.md)
- [RowsAffected proc (database query)](https://ref.dm-lang.org/database/query/proc/RowsAffected.md)
