Today, I found a strange problem when I wrote an oracle statement. I had to find the cause for a long time. Ask Daniel for help. The problem is simplified as follows:
Select seq, info, topic from system. Help where seq in (select distinct seq from system. Help where seq = 20); ----- (1)
There is a large gap between the results obtained from select seq, info, and topic from system. Help where seq in (20) ------ (2.
We all know that the result of select distinct seq from system. Help where seq = 20 is of course 20. From the statement perspective, (1) and (2) should be equivalent, but (2) the query result is correct, with only 10 rows, but (1) in seq, there are not only 20 corresponding row values, but also many rows with seq as 0 and the number of rows is 500 ...... (Khan, where do these 0 numbers come from? The help table has 71 rows in total. The help table is available in the Oracle sample database)
Select seq, info, topic from system. help where seq = (select distinct seq from system. help where seq = 20); ----- (3) This sentence is the same as (2) and can get the correct result.
Then I tested it on other people's computers. (1) The statement is the same as (2 ...... Shenma situation ...... Why is my computer unavailable?
On my computer (1) Is it wrong? Configuration problems? Or statement problems? If you have any answers, you can answer my blog. You can use garden beans.
Http://home.cnblogs.com/q/26334/