Extensions To Show Statements - Oracle 5.0 Reference Manual

Table of Contents

Advertisement

WITH CHECK OPTION;
Then the view definition looks like this:
SELECT s2,s1 FROM t WHERE s1 > 5 ORDER BY s1
• The
CHECK_OPTION
• MySQL sets a flag, called the view updatability flag, at
(true) if
UPDATE
set to
(false). The
NO
It means that the server always knows whether a view is updatable. If the view is not updatable,
statements such UPDATE, DELETE, and
if a view is updatable, it might not be possible to insert into it; for details, refer to
"CREATE VIEW
• The
DEFINER
defined the view.
MySQL lets you use different
support. For example, you might use the
the standard SQL concatenation operator, the double bar (||), in your queries. If you then create
a view that concatenates items, you might worry that changing the
value different from
matter how you write out a view definition, MySQL always stores it the same way, in a canonical form.
Here is an example that shows how the server changes a double bar concatenation operator to a
[887]
CONCAT()
mysql>
SET sql_mode = 'ANSI';
Query OK, 0 rows affected (0.00 sec)
mysql>
CREATE VIEW test.v AS SELECT 'a' || 'b' as col1;
Query OK, 0 rows affected (0.00 sec)
mysql>
SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS
->
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME = 'v';
+----------------------------------+
| VIEW_DEFINITION
+----------------------------------+
| select concat('a','b') AS `col1` |
+----------------------------------+
1 row in set (0.00 sec)
The advantage of storing a view definition in canonical form is that changes made later to the value of
[495]
sql_mode
comments prior to
19.18. Extensions to
Some extensions to
can be used to get information about the structure of
SHOW
• Several
SHOW
rows to display.
These extensions are available beginning with MySQL 5.0.3.
INFORMATION_SCHEMA
DATABASES. Similarly,
tables:
mysql>
SHOW TABLES FROM INFORMATION_SCHEMA;
+---------------------------------------+
Extensions to
column has a value of NONE, CASCADE, or LOCAL.
and
(and similar operations) are legal for the view. Otherwise, the flag is
DELETE
IS_UPDATABLE
Syntax".)
and
SECURITY_TYPE
has a value of
SECURITY_TYPE
sql_mode
[540]
could cause the view to become invalid. But this is not the case. No
ANSI
function:
|
will not affect the results from the view. However an additional consequence is that
are stripped from the definition by the server.
SELECT
Statements
SHOW
statements accompany the implementation of INFORMATION_SCHEMA:
SHOW
statements accept a
WHERE
is an information database, so its name is included in the output from
can be used with
SHOW TABLES
Statements
SHOW
CREATE VIEW
column in the
table displays the status of this flag.
VIEWS
are illegal and will be rejected. (Note that even
INSERT
columns were added in MySQL 5.0.14.
DEFINER
[495]
settings to tell the server the type of SQL syntax to
[540]
SQL mode to ensure MySQL correctly interprets
ANSI
INFORMATION_SCHEMA
clause that provides more flexibility in specifying which
INFORMATION_SCHEMA
1729
time. The flag is set to
Section 13.1.12,
DEFINER
or INVOKER.
[495]
setting to a
sql_mode
to obtain a list of its
YES
indicates who
itself.
SHOW

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Mysql 5.0

Table of Contents