select a.xx,b.xx from a,b where a.id=b.id(+) 这样就是15条了
怎么 select a.xx,b.xx from a,b where a.id(+)=b.id 和 select a.xx,b.xx from a,b where b.id(+)=a.id 结果一样? why?
晕 select a.xx,b.xx from a,b where a.id(+)=b.id 和 select a.xx,b.xx from a,b where b.id(+)=a.id 和 select a.xx,b.xx from a,b where a.id=b.id 和 select a.xx,b.xx from a,b where a.id=b.id(+) 都一样!why?
^_^>select * from test; ID K VALUE ---------- - -------------------- 1 12345 1 12345 2 222 2 232324 1 289324 0 12345已选择6行。^_^>select * from test1; ID K VALUE UD ---------- - ---------- ----- 1 a 12345 true 2 b 2345 false 3 c 67879 true^_^>select t1.id,t1.value,t2.id,t2.ud from test t1,test1 t2 where t1.id=t2.id(+); ID VALUE ID UD ---------- -------------------- ---------- ----- 0 12345 1 12345 1 true 1 12345 1 true 1 289324 1 true 2 222 2 false 2 232324 2 false已选择6行。^_^>ed 已写入文件 afiedt.buf 1* select t1.id,t1.value,t2.id,t2.ud from test t1,test1 t2 where t1.id(+)=t2.id ^_^>/ ID VALUE ID UD ---------- -------------------- ---------- ----- 1 12345 1 true 1 12345 1 true 1 289324 1 true 2 222 2 false 2 232324 2 false 3 true已选择6行。^_^>ed 已写入文件 afiedt.buf 1* select t2.id,t1.value,t1.id,t2.ud from test t1,test1 t2 where t2.id=t1.id(+) ^_^>/ ID VALUE ID UD ---------- -------------------- ---------- ----- 1 12345 1 true 1 12345 1 true 1 289324 1 true 2 222 2 false 2 232324 2 false 3 true已选择6行。
这样就是15条了
select a.xx,b.xx from a,b where a.id(+)=b.id
和
select a.xx,b.xx from a,b where b.id(+)=a.id
结果一样?
why?
select a.xx,b.xx from a,b where a.id(+)=b.id
和
select a.xx,b.xx from a,b where b.id(+)=a.id
和
select a.xx,b.xx from a,b where a.id=b.id
和
select a.xx,b.xx from a,b where a.id=b.id(+)
都一样!why?
---------- - --------------------
1 12345
1 12345
2 222
2 232324
1 289324
0 12345已选择6行。^_^>select * from test1; ID K VALUE UD
---------- - ---------- -----
1 a 12345 true
2 b 2345 false
3 c 67879 true^_^>select t1.id,t1.value,t2.id,t2.ud from test t1,test1 t2 where t1.id=t2.id(+); ID VALUE ID UD
---------- -------------------- ---------- -----
0 12345
1 12345 1 true
1 12345 1 true
1 289324 1 true
2 222 2 false
2 232324 2 false已选择6行。^_^>ed
已写入文件 afiedt.buf 1* select t1.id,t1.value,t2.id,t2.ud from test t1,test1 t2 where t1.id(+)=t2.id
^_^>/ ID VALUE ID UD
---------- -------------------- ---------- -----
1 12345 1 true
1 12345 1 true
1 289324 1 true
2 222 2 false
2 232324 2 false
3 true已选择6行。^_^>ed
已写入文件 afiedt.buf 1* select t2.id,t1.value,t1.id,t2.ud from test t1,test1 t2 where t2.id=t1.id(+)
^_^>/ ID VALUE ID UD
---------- -------------------- ---------- -----
1 12345 1 true
1 12345 1 true
1 289324 1 true
2 222 2 false
2 232324 2 false
3 true已选择6行。