Question

I'm trying to find out if a string contains certain SQL commands that alter the database by:

  • creating new tables
  • deleting existing tables
  • creating new table columns
  • deleting existing table columns

Right now I'm doing a strpos search for ALTER, CREATE and DROP which should work.

Are there any other commands that do the things above and that I should include in my search?

Note that I don't need this for security reasons. I just need to know if the table schema changed, so I can update my local cache of the schema info...

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top