Ok, I'm just an advanced user, not a dba and I don't have a need for many functions, but I really like this one.
I've created the function on a database where I have appropriate permissions, but I've noticed a behavior I did not expecct.
When trying to delete more than one temp table, I have to separate the uses of the function by 'go'. It's not enough to use a semi-colon.
Do you know why this is? Is there a way to make this work wihtout inserting 'go' between uses?
Failing that, can the function be modified to allow dropping multiple tables at once?
Thanks for submitting this.