select
id
from
tableABC
limit (select count(id) from tableCBA), 1
If I need select in limit as I have shown here in sample code, how can I do this in mySql? This is only simplified code for purpose of this forum, otherwise this is a part of sophisticated case when else select.
You can't directly have a dynamic value for limit, but your query can be re-written without the limit, as follows:
This will return the nth row, where n is the number of rows in tableCBA;