我在视图里查询两个结构一模一样的表,然后用union把两个结果合起来,但是这个视图却无法保存,提示错误为“视图定义中没有输出列或FROM子句中没有项目”。
代码如下:
select fileType, fileName, description from tabFile union select fileType, fileName, description from tablOtherFile
请大家帮帮忙,谢谢!
...全文
1993打赏收藏
为什么我的视图里不能用union?急!!
我在视图里查询两个结构一模一样的表,然后用union把两个结果合起来,但是这个视图却无法保存,提示错误为“视图定义中没有输出列或FROM子句中没有项目”。 代码如下: select fileType, fileName, description from tabFile union select fileType, fileName, description from tablOtherFile 请大家帮帮忙,谢谢!