Skip to Main Content
Oracle SQL*Plus: The Definitive Guide
book

Oracle SQL*Plus: The Definitive Guide

by Jonathan Gennick
March 1999
Intermediate to advanced content levelIntermediate to advanced
528 pages
14h 39m
English
O'Reilly Media, Inc.
Content preview from Oracle SQL*Plus: The Definitive Guide

Chapter 6. Exploring Your Database

You can create a variety of different objects in an Oracle database. You can create tables, indexes on those tables, objects, constraints, and so forth. It’s important to be able to get information about the objects you have created. After a while you are going to find yourself asking questions like: “What tables do I have defined?” and “What do they look like?” You may have an application fail because of a constraint violation. In order to understand why the error occurred, you need to know what the definition is for that constraint. Unless you have an extremely good memory, you will need to go to the database itself for this information.

Using SQL*Plus, there are two ways you can display information about objects within your database. The easiest way is to use the DESCRIBE command. DESCRIBE will tell you about columns in a table or view. DESCRIBE will also show you the definition of an object type or of a PL/SQL package. The second method for getting information about objects in your database is to query the Oracle data dictionary. The data dictionary is a set of tables Oracle uses to keep track of object definitions. To facilitate your use of the data dictionary, Oracle provides a set of views known as data dictionary views. This chapter will show you how some of these views work and how you can write scripts to query them.

The DESCRIBE Command

You may already be familiar with the SQL*Plus DESCRIBE command. DESCRIBE may be used to get a list ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle SQL*Plus: The Definitive Guide, 2nd Edition

Oracle SQL*Plus: The Definitive Guide, 2nd Edition

Jonathan Gennick
Oracle PL/SQL Programming, Third Edition

Oracle PL/SQL Programming, Third Edition

Steven Feuerstein, Bill Pribyl
Oracle SQL

Oracle SQL

Dan Hotka

Publisher Resources

ISBN: 1565925785Supplemental ContentCatalog PageErrata