mysql view, use the union

CREATE VIEW `speech_label_all_uv_pv` AS
select `speech_label_uv_pv`.`cdate` AS `cdate`,`speech_label_uv_pv`.`source` AS `source`,`speech_label_uv_pv`.`page` AS `page`,`speech_label_uv_pv`.`description` AS `description`,`speech_label_uv_pv`.`code_perform` AS `code_perform`,`speech_label_uv_pv`.`label` AS `label`,`speech_label_uv_pv`.`uv` AS `uv`,`speech_label_uv_pv`.`pv` AS `pv` from `speech_label_uv_pv` union all select `speech_label_order_uv_pv`.`cdate` AS `cdate`,`speech_label_order_uv_pv`.`source` AS `source`,`speech_label_order_uv_pv`.`page` AS `page`,`speech_label_order_uv_pv`.`description` AS `description`,`speech_label_order_uv_pv`.`code_perform` AS `code_perform`,`speech_label_order_uv_pv`.`label` AS `label`,`speech_label_order_uv_pv`.`uv` AS `uv`,`speech_label_order_uv_pv`.`pv` AS `pv` from `speech_label_order_uv_pv`


Guess you like

Origin www.cnblogs.com/shenguo/p/12168273.html