mysql 支持union吗?

xqi8 2006-12-29 12:04:23
E:\Program Files\MySQL\MySQL Server 5.0\bin>mysql -uroot -p01022112 <e:\\limit.sql
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to u
se near 'union
select com.myoffice_code ,com.type ,com.subtype ,com.case_name ,com.coun' at line 10

执行一下语句:

create or replace view v_all_limit
as
(

(select com.myoffice_code ,com.type ,com.subtype ,com.case_name ,
com.counterman,com.case_content,com.app_id,bof.Next_limit as limittime ,
"ÐøÕ¹ÆÚÏÞ" as limitname,"" as content
from common_file com , Branb_other_file bof
where
bof.file_id =com.id and Next_limit is not null and next_time is null)


union
(
select com.myoffice_code ,com.type ,com.subtype ,com.case_name ,com.counterman,com.case_content,com.app_id,
bof.check_limit as limittime ,
"名称" as limitname,
bof.year as content
from common_file com , patent_file bof
where
bof.file_id =com.id and post_check_time is null)
...全文
209 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
billpu 2007-01-03
  • 打赏
  • 举报
回复
4.0之后支持
ciaky 2007-01-02
  • 打赏
  • 举报
回复
支持的。。
yifuzhiming 2007-01-02
  • 打赏
  • 举报
回复
支持
懒得去死 2006-12-30
  • 打赏
  • 举报
回复
支持

56,678

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧