CREATE VIEW `tempdata`.`time_view` AS
SELECT c.code,c.time FROM customercomment c where c.code='A0057'
union all
SELECT c.code,c.time FROM customernote c where c.code='A0057';
...全文
14525打赏收藏
mysql的视图能传参数吗
请看以下,A0057是变量,应该传参数进去才行啊 CREATE VIEW `tempdata`.`time_view` AS SELECT c.code,c.time FROM customercomment c where c.code='A0057' union all SELECT c.code,c.time FROM customernote c where c.code='A0057';