Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: data in Oracle

Re: data in Oracle

From: Brian Peasland <dba_at_nospam.peasland.net>
Date: Thu, 10 Aug 2006 18:01:21 GMT
Message-ID: <J3snEA.ED@igsrsparc2.er.usgs.gov>


mike7411_at_gmail.com wrote:
> Does all data in Oracle need to be in a table?

All data that persists across instance shutdowns will be in a table of some sort. One could argue that a "sequence" is not a table and can be used to store a number, but the definition of that sequence is stored in a table.

> If you just want a simple lone integer that counts, say, the number of
> users in your database, is there an easy way to create that?

Why not just query the database for this answer?

SELECT COUNT(*) FROM dba_users;

Or,

SELECT COUNT(*) FROM v$session WHERE username IS NOT NULL;

The first query will give you all user accounts (schemas) in the database. The second query will give you the count of currently connected users.

HTH,
Brian

-- 
===================================================================

Brian Peasland
dba_at_nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
Received on Thu Aug 10 2006 - 13:01:21 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US