Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: so, what is the right way to count tablespace free space
Question for you:
tableA contains 1 row
ORA92> select * from tableA;
COL1 MYNUM
-------------------- ----------
SYSTEM 100
1 row selected.
tableB contains 10 rows
ORA92> select * from tableB;
COL1 MYNUM
-------------------- ----------
SYSTEM 1 SYSTEM 1 SYSTEM 1 SYSTEM 1 SYSTEM 1 SYSTEM 1 SYSTEM 1 SYSTEM 1 SYSTEM 1 SYSTEM 1
10 rows selected.
what will the following sql return?:
select sum(tableA.mynum), sum(tableB.mynum)
from tableA, tableB
where tableA.col1 = tableB.col1
/
?
The question directly pertains to your 3rd option (Hint: Wrong query!).
The first option and the second option are not doing the same thing. First one accounts for autoextending datafiles, the second one doesn't.
Careful with that axe, Eugene :) Received on Fri May 20 2005 - 15:09:22 CDT