How to drop delete sql table in ignition

I am having trouble finding the syntax of how to drop an SQL table in Ignition.

When I use this code in my script “Drop Table [Ignition].[dbo].[PT_Downtimme]”

I get this error:
(Parse error for event handler “actionPerformed” SyntaxError: (“no viable alternative at input ‘table’”, (’’, 1, 5, ‘drop table [Ignition].[dbo].[PT_Downtimme] \n’)))

Any help is greatly appreciated.
Sam

Never mind. I think I can do this in a store procedure.
Thanks

I looks like you were trying to put SQL directly in your python. SQL needs to be in a string, then sent to the database with an appropriate system.db.run*() function call. You have a parse error from python, not SQL.

{ system.db.runUpdateQuery() should work fine with a DROP TABLE statement, as long as Ignition’s connection has the appropriate permissions. }

Thank you, pturmel!