Fairly simple question, but I don’t see it anywhere else on SO:
Do indexes (indices?) on a temporary table get automatically deleted with the temporary table?
I’d imagine they do but I don’t really know how to check to make sure.
Thanks,
Phil
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes they get dropped along with the table. It is not possible for an index to exist independently of its table.
In terms of checking this for yourself you could do
before and after running your DROP temp table.