两个表合并为一个表的信息,并创建视图
create view wos_tzgg_con as select dbbinzhou_bincheng.wos_xxzy_con.`id` as `id`,dbbinzhou_bincheng.wos_xxzy_con.`title` as `title`,dbbinzhou_bincheng.wos_xxzy_con.`code` as `code`,FROM_UNIXTIME(dbbinzhou_bincheng.wos_xxzy_con.`dtime`) as dtime,dbbinzhou_bincheng.wos_xxzy_con.`source` as `source` from dbbinzhou_bincheng.wos_xxzy_con where dbbinzhou_bincheng.wos_xxzy_con.`catid`=10 and dbbinzhou_bincheng.wos_xxzy_con.`iffb`=1 union select dbbinzhou_xxgkbc.yun_news.`id` as `id`,dbbinzhou_xxgkbc.yun_news.`title` as `title`,dbbinzhou_xxgkbc.yun_news.`code` as `code`,dbbinzhou_xxgkbc.yun_news.`pickerdate` as dtime,dbbinzhou_xxgkbc.yun_news.`source` as `source` from dbbinzhou_xxgkbc.yun_news,dbbinzhou_xxgkbc.yun_news_tag where dbbinzhou_xxgkbc.yun_news.`iffb`=1 and dbbinzhou_xxgkbc.yun_news_tag.`tcode`=‘N1cdd8493bd59851f9f2213a9b3a844f6‘ and dbbinzhou_xxgkbc.yun_news_tag.`ncode`=dbbinzhou_xxgkbc.yun_news.`code` (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |