I tried writing query using exists, but no success so far. Searching hasn’t helped so far.
I tried writing query using exists , but no success so far. Searching hasn’t
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.
If you attempt to alter a table that does not exist, the query will fail with an error:
Table 'database.table' doesn't existMySQL does support
ALTER IGNORE TABLE, but that only turns errors into warnings if you’re attempting to create a unique index while there are values in the table that violate that index.If you would like to make sure that you do not produce any database queries, I would suggest ensuring the table’s existence using
SHOW TABLES LIKE 'tablename'before running yourALTER TABLEquery.