These SQLs should be give same result? Second one gives an error (SQL Error 1064).
Correct : ALTER TABLE table1 TRUNCATE PARTITION d20;
Does not work : ALTER TABLE table1 TRUNCATE PARTITION concat('d', '20');
Actually I stuck on truncate table with respect to day of month, (ie today is 25th) execute
i was planned sql like below, but does not work
ALTER TABLE table1 TRUNCATE PARTITION DAYOFMONTH(now());
No, they shouldn’t.
TRUNCATE PARTITIONaccepts a partition name, which is not a string.UPD:
You still can create and perform dynamic sql queries using
PREPARE+EXECUTE