How Can I truncate Multiple Tables in MySql?

Posted by Luiscencio on Stack Overflow See other posts from Stack Overflow or by Luiscencio
Published on 2009-10-15T22:11:24Z Indexed on 2010/03/22 12:51 UTC
Read the original article Hit count: 325

Filed under:
|
|

I need to clear all my inventory tables.

I've tryed

SELECT 'TRUNCATE TABLE ' + TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME LIKE 'inventory%'

but I get this error:

Truncated incorrect DOUBLE value: 'TRUNCATE TABLE ' Error Code 1292

if this is the correct way, then what am I doing wrong?

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql