Re: SQL*Plus newbie questions

From: Robert Hatcher <robert.hatcher_at_citicorp.com>
Date: 1996/01/22
Message-ID: <4e07l8$jha_at_spruce.citicorp.com>#1/1


: 1. Once connected to the database via SQL*Plus, how do you list
: the tables. (Informix equivalent: info tables)

Many ways: select table_name from sys.dba_tables where owner <>'SYS';

: 2. Are there any system catalog tables which hold info about
: the tables, columns, etc in the database.
: (Informix equivalent: systables, syscolumns, etc)

sys.dba tables, sys.dba_tab_columns, etc. You can desc sys.dba_tab_columns to view their structure. These are all doc's in the manuals (and various posters from different vendors....)

: 3. How do you determine the number of tables in the database.
: (Informix equivalent:
: select count(*) from systables where tabtype = "T")

select count(*) from sys.dba_tables where owner <> 'SYS'; (unless you want the sys tables also...

: 4. How do you list the columns in a table.
: (Informix equivalent: info columns for tablename)

select column_name from sys.dba_tab_columns where table_name='TABLE_NAME'; Received on Mon Jan 22 1996 - 00:00:00 CET

Original text of this message