如何在phpmyadmin中创建mysql视图

时间:2015-12-07 09:47:56

标签: mysql view

如何在mysql中创建phpmyadmin视图?

我在phpmyadmin

的sql窗口中执行了以下查询
CREATE ALGORITHM = UNDEFINED DEFINER = user SQL SECURITY DEFINER VIEW `employees` 
                    AS select * from test.emp WITH LOCAL CHECK OPTION

但它给出了错误:

SQL查询:文档

CREATE
 ALGORITHM = UNDEFINED
 DEFINER = user
 SQL SECURITY DEFINER
 VIEW `employees`
 AS  select * from test.emp 
 WITH LOCAL  CHECK OPTION

MySQL说:文档

#1046 - Aucune basen'aétésélectionnée

当我只是运行查询“select * from test.emp;”时,它会正确执行,点击创建视图时,它会创建带有选项的视图。但是通过语法它会给出错误。

0 个答案:

没有答案