August 2002
Intermediate to advanced
528 pages
10h 12m
English
SQL*Plus has two tools for finding out the names of the database tables and the names of the columns in the tables:
SELECT TNAME FROM TAB; This SELECT statement will list the table and view names for which you have access.
DESC (table name) or Describe (table name) Either version of the command displays the names, data types, and NOT NULL constraints of the columns contained in the table or view.
Identifying table and column names are two of the common tasks you will perform when using a database. If you don’t have a table relationship diagram, these tools will be very useful to you.
Listing 4.1 illustrates the use of the former command.
SQL> select tname from tab; TNAME ------------------------------ ... |