Choose your database:
AnySQL
MySQL
MS SQL Server
Oracle
PostgreSQL
SQLite
Firebird
SQL Anywhere
DB2
MaxDB

Subscribe to our news
Partners
Testimonials
Michael Dunn: "We're good to go though, thank you again, this is by far the best MySQL interface I've had the opportunity to work with".
Rati Dzidziguri: "I'm working on development of ERP and CRM software and during the process of creation of those products I have tried lots of solutions by the only solution I would call as an user friendly professional and with many other epithets is MySQL Maestro and all Maestro toolkits".

More

Add your opinion

SQL Maestro for MySQL online help

Prev Return to chapter overview Next

Specifing view options

Specify view options according to your needs. The detailed description is given below.
 

 

Name

You may specify here the name of the view being created.

 

Owner

Defines the owner of the new view. By default, only the owner of an object can perform various operations with the object. In order to allow other users to operate it, privileges must be granted. (However, users that have the superuser attribute can always access any object.)

 

Comment

The box allows you to set optional text describing the view.

 

SQL Security (Definer, Invoker)

These values indicate that the view must be executable by the user who defined it or invoked it, respectively. The default value is Definer. The feature was added in MySQL 5.1.2.

 

Algorithm (Undefined, Merge, Temporary Table)

The algorithm affects how MySQL processes the view.

Merge

The text of a statement that refers to the view and the view definition are merged such that parts of the view definition replace corresponding parts of the statement.

Temporary Table

The results from the view are retrieved into a temporary table, which then is used to execute the statement.

Undefined

MySQL chooses which algorithm to use. It prefers MERGE over TEMPTABLE if possible, because MERGE is usually more efficient and because a view cannot be updatable if a temporary table is used.

A reason to choose Temporary Table explicitly is that locks can be released on underlying tables after the temporary table has been created and before it is used to finish processing the statement. This might result in quicker lock release than the Merge algorithm so that other clients that use the view are not blocked as long.

 

With Check Option

Check the option for an updatable view to prevent inserts or updates to rows except those for which the WHERE clause in the select statement is true.

 

Check option kind (Cascaded, Local)

The clause is available if With Check Option is 'on'. It allows to determine the scope of check testing when the view is defined in terms of another view. The Local restricts the Check option only to the view being defined. Cascaded causes the checks for underlying views to be evaluated as well. When neither keyword is given, the default is Cascaded.



Prev Return to chapter overview Next