all of the procedure help I've found can be used for choose reasons only.
can one write a table to truncate several tables?
much like (but this doesn't work)
CREATE PROCEDURE clearall() BEGIN truncate tallgrrl.auth; truncate tallgrrl.factory; truncate tallgrrl.farm; truncate tallgrrl.player; truncate tallgrrl.timer; END;
truncate may not work for those who have associations with this table for the reason that situation you have to either
drop the connection truncate the table and recreate the connection again
Absolutely. Among the reasons of saved methods would be to encapsulate logic/multiple procedures.
I'm not sure why your TRUNCATE is not working. I've saved procs that TRUNCATE tables. What DB platform are you currently using?
Does your TRUNCATE work outdoors from the SP? As SQLMenace mentions, you can't use TRUNCATE on tables with FK dependencies.
Try switching to "remove from [table title]", because truncate may not work because of privileges problem.
You need to have the ability to. Possibly you do your truncations within the wrong order (and breaking the integrity constraints. e.g., you cannot remove a parent or gaurdian until you will find no children hanging from it.
You may want to alter the order from the truncations to ensure that foreign secrets aren't cut down prior to the data that references them.
What error(s) would you get?
Aside from the aforementioned FK potential problem, with respect to the privileges from the user performing the proc you will possibly not have permissions to truncate.