No, you cannot do it. You can use these statements only inside BEGIN…END clause.
So, it is possible in stored procedures/functions, triggers and events.
More information here – MySQL Compound-Statement Syntax.
More Related Contents:
- Why do I get an error from this sub query script?
- sql query to modify the selected value from database [closed]
- how to get similar search results in MySQL?
- How can I SELECT rows with MAX(Column value), PARTITION by another column in MYSQL?
- Can I concatenate multiple MySQL rows into one field?
- Disable ONLY_FULL_GROUP_BY
- SELECT list is not in GROUP BY clause and contains nonaggregated column …. incompatible with sql_mode=only_full_group_by
- How to do the Recursive SELECT query in MySQL?
- MySQL, update multiple tables with one query
- How do I see all foreign keys to a table or column?
- Do different databases use different name quote?
- MySQL case sensitive query [duplicate]
- Simulating MySQL’s ORDER BY FIELD() in Postgresql
- What does mysql error 1025 (HY000): Error on rename of ‘./foo’ (errorno: 150) mean?
- How do I change the data type for a column in MySQL?
- mysql fulltext search failure
- Adding a leading zero to some values in column in MySQL
- Using SQL to determine word count stats of a text field
- Update one MySQL table with values from another
- MySQL Order before Group by
- How to transpose mysql table rows into columns
- Regaining access to lost MySQL password for PHPMyAdmin on WAMP
- Export a MySQL Database to SQLite Database
- “193: %1 is not a valid Win32 application” bug with a new Rails Application
- How to display open transactions in MySQL
- SQL search multiple values in same field
- Removing duplicates with unique index
- MySQL – Select the last inserted row easiest way
- Ruby gem mysql2 install failing [duplicate]
- What’s the best way to migrate a Django DB from SQLite to MySQL?