4
Dynamic SQL enables you to build SQL statements dynamically at runtime. It can be generated within an application or from the system tables and then executed against the database to manipulate the data. You can create more general purpose, flexible applications by using dynamic SQL since the full text of a SQL statement may be unknown at the time of compilation.
8
4
In Drizzle you can use the EXECUTE command along with :doc:'user defined variables <variables>'
9
5
to create SQL in a dynamic manner on the server. An exmaple of this is:
16
10
You can also omit the variable and just insert the SQL directly:
23
15
generated and no data will be returned by the execution of the statement.
25
17
If you want to launch the query in a separate session, you can do that with
32
24
The query will run in a new session and will execute as the user that
33
25
launched it. It can be killed via KILL and the system limit on total number
34
26
of sessions will be enforced.