How to create a temporary MySQL table using the SQL for Confluence (Pro edition) app

This article explains how to create a temporary table in a MySQL database using the SQL for Confluence (Pro edition) app.

Instructions

  1. Login to your Confluence instance.
  2. Navigate to the required page and click the Edit icon ().
  3. Add SQL macro and click Edit to open the macro settings.

  4. Select Data source profile under the SQL statement section and enter the SQL statement as shown:

  5. Click Save settings.
  6. To verify whether the table is created, execute the following query in your database:

  • Use the SQL macro for insert, update or create actions.
  • It is recommended to test this function in a non-production environment before creating it in production.
  • Ensure that the confluence-user group has relevant permissions to access the SQL macro.