Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Questions re subqueries
Greetings,
I am struggling to get my head wrapped around an issue which is confusing me greatly. I hope I can articulate this properly but given my confusion I may muddy the waters here. I have two 10.2.0.3.0 databases, the local one on Linux and a remote one on Solaris. I don't think platform is involved but one never knows. On each database I have a simple table with one column, varchar2 encrypted using TDE on the local node, unencrypted (TDE not implemented) on the remote node. Each table has one row with null values.
Local...
SQL> desc t1
Name Null? Type ----------------------------------------- --------SQL> select count (*) from t1;
----------------------------
C1 VARCHAR2(2) ENCRYPT
4
SQL> select * from t1;
C1
--
1
2
3
Remote...
SQL> desc oracle.t1_at_bill_testx
Name Null? Type ----------------------------------------- --------SQL> select count (*) from oracle.t1_at_bill_testx; COUNT(*)
----------------------------
C1 VARCHAR2(2)
4
SQL> select * from oracle.t1_at_bill_testx;
C1
--
1
2
5
Now I execute the following selects, both from the local database...
SQL> select * from t1 where exists
2 (select 'x' from oracle.t1_at_bill_testx a where a.c1 = t1.c1);
C1
--
1
2
2 rows selected.
SQL> select * from t1 where not exists
2 (select 'x' from oracle.t1_at_bill_testx a where a.c1 = t1.c1);
C1
--
3
2 rows selected.
The second one is not really what I would expect but this is where I start to get confused and am hoping someone can shed some light on the situation for me. The issues are...
C1
--
1
2
3
4 rows selected.
What I don't understand is the relation between the variables, TDE, the nulls and the _unnest_subquery parameter. I am quite confused. If anyone can shed some light on this and explain to me what is going on I would greatly appreciate it.
Thank you.
Bill Wagman
Univ. of California at Davis
IET Campus Data Center
wjwagman_at_ucdavis.edu
(530) 754-6208
--
http://www.freelists.org/webpage/oracle-l
Received on Tue Jun 19 2007 - 18:32:08 CDT
![]() |
![]() |