Is it possible to create Dynamic SQL statements purely in SQLite? [closed]
-
12-03-2021 - |
题
A lot of modern RDBMS have a feature called Dynamic SQL
(MS SQL Server, for example) which allows you to build your SQL statements in strings and then execute that string of SQL.
Does such a feature exist purely in SQLite?
I'm aware I can build my statements dynamically using a functional language that uses SQLite as a database. But that's not applicable to the problem I'm trying to solve because the dynamic statements I'm trying to build are based off of relational logic and involve sqlite_master
and PRAGMA
, and translating that logic into a functional language makes trying to solve this problem not worth it.
For all intents and purposes, I have the flexibility to use any version of SQLite to solve this problem.
解决方案
No.
SQLite is designed as a small, embedded database to be accessed from a 'real' programming language. Dynamic SQL is not needed for its intended purposes.