主库建了一个视图,语句为create or replace VIEW `LS_1_STANDARD_PRE_ONE`
as
select max(sort_sn) as verNo,STANDARD_ID
from c2_bdg_ds_his_version
group by standard_id
;
从库报错表LS_1_STANDARD_PRE_ONE不存在,
前面的能够正常传输,语句为create or replace VIEW `pre_view_c2_bdg_ds_datameta` AS SELECT
`c2_bdg_ds_dataset_item`.`DATAMETA_ID` AS `DATAMETA_ID`,
count(`c2_bdg_ds_dataset_item`.`DATAMETA_ID`) AS `REL_TIMES`
FROM
`c2_bdg_ds_dataset_item`
where isnull(`c2_bdg_ds_dataset_item`.`DATAMETA_STANDARD_ID`) or `c2_bdg_ds_dataset_item`.`DATAMETA_STANDARD_ID` = `c2_bdg_ds_dataset_item`.`STANDARD_ID`
GROUP BY
`c2_bdg_ds_dataset_item`.`DATAMETA_ID` ;
-- pre_view_c2_bdg_ds_datameta_1视图
create or replace VIEW `pre_view_c2_bdg_ds_datameta_1` AS SELECT
`c2_bdg_ds_dm_di_his_ref`.`DM_ID` AS `DM_ID`,
count(
`c2_bdg_ds_dm_di_his_ref`.`DM_ID`
) AS `REVOCABLE_NUM`
FROM
`c2_bdg_ds_dm_di_his_ref`
GROUP BY
`c2_bdg_ds_dm_di_his_ref`.`DM_ID` ;
,同事说不能修改视图名称。