gpt4 book ai didi

mysql - Mysql Workbench 中 Alter View 时解析 ddl 时出错

转载 作者:行者123 更新时间:2023-11-30 01:17:20 26 4
gpt4 key购买 nike

尝试更改 Mysql Workbench 中的 View 时出现错误。 View 是:

CREATE VIEW `ct_objects_v` AS
SELECT
*
from
ct_objects as ct_o
where
exists( select
1
from
um_appl_restriction_list as um_rl
where
ct_o.ID = um_rl.OBJ_ID
and um_rl.OBJECT_TYPE = 'CT_OBJECTS')

当改变它时,我得到“Error parsing DDL for ...”:

    delimiter $$

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ct_objects_v` AS
select `ct_o`.`ID` AS `ID`,`ct_o`.`NAME` AS `NAME`,`ct_o`.`MAP` AS `MAP`,`ct_o`.`DESCR` AS `DESCR`,`ct_o`.`ADRESS` AS `ADRESS`,`ct_o`.`NT_CITY_ID` AS `NT_CITY_ID`,`ct_o`.`CT_CATEGORY_ID` AS `CT_CATEGORY_ID`,`ct_o`.`WORKTIME` AS `WORKTIME`,`ct_o`.`INETADRESS` AS `INETADRESS`,`ct_o`.`CONTACTS` AS `CONTACTS` from `ct_objects` `ct_o` where exists(select 1 AS `1` from `um_appl_restriction_list` `um_rl` where ((`ct_o`.`ID` = `um_rl`.`OBJ_ID`) and (`um_rl`.`OBJECT_TYPE` = _cp1251'CT_OBJECTS')))$$

SQL 编辑器将我指向“CT_OBJECTS”错误,并提示:“语法错误,意外的 STRING_TEXT”。

最佳答案

我将表“um_appl_restriction_list”的字符集更改为“utf8”,现在可以使用了。

关于mysql - Mysql Workbench 中 Alter View 时解析 ddl 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18931904/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com