You are on page 1of 1

Assignment #8

Data Dictionary
1. Describe the data dictionary view called DICTIONARY.
DESCRIBE dictionary
2. List the names of all the users whose objects you have access to in the database.
SELECT distinct owner
FROM all_objects
3. List the comments on the columns for the STUDENT table along with their column names.
SELECT
FROM
WHERE
AND

column_name, comments
all_col_comments
table_name = 'STUDENT'
owner = 'STUDENT'

4. Show the source text, the name of the owner, and the view name for a view of your choosing. You may
choose one of the Data dictionary views if you wish or you may create a view.
SELECT owner, view_name, text
FROM all_views
WHERE view_name = 'SALES'
5. Show the columns for the Primary Key constraints in tables owned by STUDENT (Note: Constraint Type is
'P' for Primary Key constraint).
SELECT
FROM
WHERE
AND
AND
AND
AND

column_name, a.table_name
all_constraints a, all_cons_columns b
a.owner = b.owner
a.table_name = b.table_name
a.constraint_name = b.constraint_name
a.owner = 'STUDENT'
constraint_type = 'P'

You might also like