question

maria23-23 avatar image
maria23-23 asked

mysql: stored procedure

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.

stored-proceduresstored procedures
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.