Closed hustjieke closed 3 years ago
MySQL 8.0 syntax:
DO expr [, expr] ...
refer:
DO executes the expressions but does not return any results. In most respects, DO is shorthand for SELECT expr, ..., but has the advantage that it is slightly faster when you do not care about the result.
For more information, see: https://dev.mysql.com/doc/refman/8.0/en/do.html
Example: This SELECT statement pauses, but also produces a result set:
mysql> SELECT SLEEP(5); +----------+ | SLEEP(5) | +----------+ | 0 | +----------+ 1 row in set (5.02 sec)
DO, on the other hand, pauses without producing a result set.:
mysql> DO SLEEP(5); Query OK, 0 rows affected (4.99 sec)
MySQL 8.0 syntax:
refer:
For more information, see: https://dev.mysql.com/doc/refman/8.0/en/do.html
Example: This SELECT statement pauses, but also produces a result set:
DO, on the other hand, pauses without producing a result set.: