- 论坛徽章:
- 0
|
以下语句成功:
select 'a' c union all select 'b' c
except
(select 'a' c union all select 'c' c)
显示结果为'b'
但是一下语句失败:
select * from (select nid,vname from A_test1) t1
except distinct
select * from (select nid,vname from A_test2) t2
结果是"查询块类型不被识别"
信息:
db:sybase iq 12.5
sql:
create table A_test1(nid numeric(9),vname varchar(9));
create table A_test2(nid numeric(9),vname varchar(9));
insert into A_test1 values(1,'a');
insert into A_test1 values(2,'b');
insert into A_test2 values(1,'a');
insert into A_test2 values(2,'c');
commit; |
|