I am unable to create a view. It throws an error that that table already exists, but if I try to drop it, it says unknown table. I checked out this question but it didnt help much.
drop view if exists foo;
create view foo ... ;
# Table foo already exists
drop table / DROP TABLE IF EXISTS foo;
# unknown table foo
Flush table/repair table
didnt solve either. Any ideas ?
use the following syntax to replace the view:
CREATE OR REPLACE VIEW `my_view` AS SELECT ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With