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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Understanding sqlplus syntax

Re: Understanding sqlplus syntax

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Thu, 1 Jan 2004 10:48:34 -0500
Message-ID: <5JGdnQpwFo863GmiRVn-tA@comcast.com>


other comments have addressed the basic question well

i'd like to add the point that what you're asking about is SQL, not SQLPLUS -- SQL is the language, SQL*Plus is one of many programs that can be used to submit SQL statements to Oracle

(bit of a pet peeve, i've seen too many texts that refer to SQL*Plus as Oracle's extensions to the SQL language)

"Jon" <jhoug2_at_hotmail.com> wrote in message news:24204a6.0312310938.70ae304c_at_posting.google.com...
| Hi,
|
| I'm attempting to come up with a SQL script that calculates disk space
| usage with columns for Total, Free, Used, %Free & %Used. I think I've
| found several scripts that I can piece together into one script that
| will do what I'm looking for. However, being quite new to SQL
| scripts, I need to understand several areas of these scripts. Here is
| a sample of one of the scripts:
|
| select df.tablespace_name tablespace,
| df.bytes/(1024*1024) tot_ts_size,
| sum(fs.bytes)/(1024*1024) free_ts_size,
| df.bytes/(1024*1024)-(fs.bytes)/(1024*1024) used_ts_size,
| round(sum(fs.bytes)*100/df.bytes) ts_pct,
| round((df.bytes-sum(fs.bytes))*100/df.bytes) ts_pct1
| from dba_free_space fs, (select tablespace_name, sum(bytes) bytes
| from dba_data_files
| group by tablespace_name ) df
| where fs.tablespace_name = df.tablespace_name
| group by df.tablespace_name, df.bytes
|
| I know that "bytes" and "tablespace_name" are columns in the
| "dba_free_space" and "dba_data_files" System tables, but I don't know
| what the "df." and "fs." in the "df.tablespace_name", "df.bytes" &
| "fs.bytes" columns mean, along with the "df" and "fs" in the FROM
| clause. Any ideas?
|
| Thanks,
Received on Thu Jan 01 2004 - 09:48:34 CST

Original text of this message

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