views cannot be created

#1142 - CREATE VIEW command denied to user ‘epiz_20384169’@‘192.168.0.6’ for table ‘sales’

I get this message when creating a view for a table. Any ideas?

Your title answer the question already: views cannot be created. They are not supported on InfinityFree.

Why? it is an important basic feature of MySQL.

@panchitio said:
Why? it is an important basic feature of MySQL.

I have worked with lots of sites and companies using MySQL and none of them have ever used views. They are a programming anti pattern because you’re embedding business logic in your database which should be in your application code.

Views in MySQL have historically been very poorly implemented and are very slow and don’t scale well. Additionally, they risk hiding lots of query complexity, making it easy to write queries which look simple but are very inefficient. They are definitely not a “basic feature”.

I would higly recommend to anyone to never, ever use database views (or functions, triggers, procedures, etc.).

Further reading:

Some views are updatable, making them extremely usable. They do not burden the server for there is no need to make a new query each time the data is needed.