In SQLServer I use after insert
or update
I use:
SET @LINHAS_AFETADAS = @@ROWCOUNT
So I get the number of rows affected, I would like to know the equivalent in MySQL, I searched the web but found only code solutions, I need to do it directly in query
, tried ROW_COUNT()
, but this function returned 0
for no affected row and -1
for 1 or more row.