I have database that contains only events history for account. This DB will have as many tables as registered accounts, but every table will have similar structure, so only difference is only in names of table. I wan to run query that will trim other logs except last N values.
According to this question I can schedule autorunning some query for single table.
Can I execute same query for every table in DB without manual setting it to every table?