在我在MySQL Workbench中创建的数据库模型中,我定义了一个视图.当我现在从diagramm(菜单 – >数据库 – >正向工程师或Ctrl G)生成sql时,将为我的视图创建此代码:
-- -----------------------------------------------------
-- Placeholder table for view `myview`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `myview` (...table columns...);
SHOW WARNINGS;
-- -----------------------------------------------------
-- View `myview`
-- -----------------------------------------------------
DROP VIEW IF EXISTS `myview` ;
SHOW WARNINGS;
DROP TABLE IF EXISTS `myview`;
SHOW WARNINGS;
DELIMITER $$
CREATE OR REPLACE VIEW `myview` AS
...view definition...
$$
DELIMITER ;
;
SHOW WARNINGS;
SET sql_MODE=@OLD_sql_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
为什么要创建此占位符表?
谢谢
最佳答案
原文链接:https://www.f2er.com/mysql/433130.html