I have a stored procedure that writes results to a Result table. How do you truncate / erase a table from within a stored procedure?
example
call peformTest()
truncate TestResultTable;
//do stuff with new data to insert into TestResultTable
end
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.
If you want to remove all data from the table, then your syntax is correct:
or
Depending on your specific needs, if you need to get rid of the table correctly and then re-create it, you can do: