This section takes you through some example syntax for modifying data in MySQL. For more details on this syntax, visit Chapter 12, Programmable Objects. This chapter will also outline the differences in syntax for Oracle, PostgreSQL, and SQL Server.
Programmable objects
Syntax for views
To create a view, you can use the following sample syntax:
CREATE VIEW nameofview AS SELECT col1, col2, co1n FROM tablename WHERE condition(s);
To create a view that will be used to modify data, you can use the following sample syntax:
CREATE VIEW nameofview AS SELECT col1, col2, co1n FROM tablename WHERE condition(s)
WITH CHECK OPTION;