Warning: Creating default object from empty value in /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 4991

Warning: Creating default object from empty value in /www/htdocs/v030397/mysql-qotd/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 4993
Question 50: Which statements about the view below are true? – MySQL Question of the Day

Skip to content

By plogi in mysql questions

(Find all correct answers)

create view tt.inno_tables as
  select v1.* from
    (select * from information_schema.tables
    where engine='innodb')
  v1;

 
a) This view is valid and mysql can use the MERGE algorithm.
b) This view is valid and mysql has to use the TEMPTABLE algorithm.
c) This view is invalid because it uses a select in the FROM-clause.
d) This view is invalid, as you can’t create a view on information_schema tables.

Tags: , ,

Comment Feed

One Response

  1. plogi27. May 2010 @ 16:50:41


    c

    The create view will fail with:

    ERROR 1349 (HY000): View's SELECT contains a subquery in the FROM clause
    

    Try “help create view” or check http://dev.mysql.com/doc/refman/5.0/en/create-view.html

You must be logged in to post a comment.