Writing Dynamic SQL
Warning
SingleStore 9.0 gives you the opportunity to preview, evaluate, and provide feedback on new and upcoming features prior to their general availability. In the interim, SingleStore 8.9 is recommended for production workloads, which can later be upgraded to SingleStore 9.0.
When you write dynamic SQL, you will often follow one or more of the approaches outlined below.
Task |
Approach |
---|---|
Run a non- |
Use EXECUTE IMMEDIATE. |
Run a dynamic |
Use EXECUTE IMMEDIATE with ECHO SELECT |
Run a dynamic |
Use COLLECT with a query type variable. |
Run a dynamic |
Use SCALAR with a |
Last modified: April 28, 2021