-2

Using

ALTER TABLE global DROP COLUMN mode;

works as long the column exists.

Using

ALTER TABLE global DROP COLUMN IF EXISTS mode

is not supported in SQLITE.

I would like to run the SQL command in any case. How can I achieve this.

tbasien
  • 87
  • 7
  • Run the command and ignore the error. Or use a meta query to determine if the column exists, then run the command if so (see https://stackoverflow.com/questions/18920136/check-if-a-column-exists-in-sqlite) – topsail Aug 25 '23 at 13:48

0 Answers0