In MySQL we can use the DO
statement if we want to execute an expression without getting a result set.
DO
works in a similar way to the SELECT
statement, but without returning a result set like SELECT
normally would. DO
can also be slightly faster, given it doesn’t return a result set.
This could be useful in stored functions or triggers that don’t allow us to run statements that return a result set.
Continue reading