1

我有一个这样的查询,

表A数据,

PK    Fst_Name  Mid_Name Last_Name   Full_NAme 
---------------------------------------------------
1     Peter              Kisnan      Peter,Kisnan
2     Jeff      S        Boycott     Jeff,S,Boycott

select 1,PK,fst_name,Last_Name,Full_Name from A where PK=2
union
select 2, PK,fst_name,Last_Name,Full_Name from A where last_name='Kisnan' and fst_name='Peter'

结果

1,2,Jeff,Boycott, Jeff,S,Boycott
2,1,Jeff,Boycott, Jeff,S,Boycott

谁能回答这怎么可能?我使用的是 Oracle 10g

也查询

select count(1) from A where last_name='Kisnan' and fst_name='Peter' shows 2. but
select count(1) from A where last_name like'%Kisnan' and fst_name like'%Peter' shows 1. 
4

0 回答 0