% confuses python raw sql query
- by Jonathan
Following this SO question, I'm trying to "truncate" all tables related to a certain django application using the following raw sql commands in python:
cursor.execute("set foreign_key_checks = 0")
cursor.execute("select concat('truncate table ',table_schema,'.',table_name,';') as sql_stmt from information_schema.tables where table_schema = 'my_db'…