Skip to content

Best way to allow a dynamic (unsafe) "run arbitrary SQL" page? #183

Answered by lovasoa
shah asked this question in Q&A
Discussion options

You must be logged in to vote

Hello !
There is no such feature built into SQLPage itself, but you can use your database's own dynamic sql evaluation function to implement that:

  1. SQLite: SQLite Dynamic SQL with the define extension
  2. PostgreSQL: EXECUTE in PL/pgSQL (you can wrap it in a function)
  3. MySQL: MySQL Dynamic SQL using EXECUTE
  4. Microsoft SQL Server: Dynamic SQL in SQL Server using sp_executesql

see https://www.databasestar.com/dynamic-sql/

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by shah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request question Further information is requested
2 participants