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)