How I can run a command in phpMyAdmin which will drop all columns in a database that have the prefix test_.
How I can run a command in phpMyAdmin which will drop all columns in
Share
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.
To drop a column from a table, use the syntax:
To find all the columns in a table in a database that start with test_, do the following:
If you were doing this manually, I would recommend running the following query and then pasting the results in to a mysql query interface:
You can do something similar in code, by running the query, returning the results and then running each row as a query.