This is probably very basic stuff. I want to create a table if a certain condition is met. Basically I have a db with a version number, and if the version is as expected, a new table is created.
This is pretty straightforward to do, say, in python, but is there a pure SQL way, or then a pure SQLite way, of doing this? Basically I want to know if my update scripts could be free of any other programming langage other than SQL (or SQLite's SQL).
I looked at the CASE clause but it seems I can't use it as a top-level switch statement.