MYSQL - stored procedure query:
What should I use when creating a procedure with 2 main scopes:
1. to delete multiple tables and then recreate all the tables? - the reason for this seems to be: if someone enters something wrong, he should be able to truncate the rows of the table.
2. In the same procedure, the second scope would be to create indexes (primary key with auto_increment)?
I was thinking in using user-defined variables or view with merge? Or maybe a procedure with some input variables?
I am beginner at this, also I am a little bit confused as I didn't get so well the procedure and how to use it with multiple instructions or parameters.
Any suggestions are useful. Many thanks.