How to fix a broken SQL view

MySQL:

SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME = 'v';

reference: The INFORMATION_SCHEMA VIEWS Table

SQL Server:

USE databasename
GO

EXEC sp_helptext viewName

or also a query like this:

SELECT TABLE_NAME as ViewName,
VIEW_DEFINITION as ViewDefinition
FROM INFORMATION_SCHEMA.Views

where you could add a WHERE to only retrieve one view


Simply delete the view with "drop view object_6", then go into the pimcore backend and save the class again. The view is then regenerated automatically.

Tags:

Mysql

View