By using AWS re:Post, you agree to the Terms of Use
/Fetch the number of rows returned/affected by a SQL query/

Fetch the number of rows returned/affected by a SQL query

0

My use case is to fetch the number of rows returned/affected by a SQL query of Postgres/MYSQL RDS using the logs. Is there any configuration option?

1 Answers
0

This is an old school answer but you could do it with something like:

SELECT * FROM foo WHERE ... UNION ALL select count(*), NULL from foo WHERE ...;

The last row will contain the count of the query

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions