Hi Everybody,
I have a database for a fictional school. It contains tables for faculty, students, course, section, term, enrollment, etc.
I am trying to write a script that provides all of the information in, and duplicates the formatting of, Oracle's SQL*Plus describe command. The output should add the comments on the rows. the input is: owner (system) and table name (term (or any of my tables)). Output should be: columns for Name, Null?, Type, Comments.

I enter "system" as owner and Term for table, but the only thing returned is the name of the table, not the other information I need.

My script looks like this:

SELECT table_name
FROM all_tables
WHERE owner = UPPER('&schemaowner')
AND table_name LIKE UPPER('%&table%');

This is the output:

old:SELECT table_name
FROM all_tables
WHERE owner = UPPER('&schemaowner')
AND table_name LIKE UPPER('%&table%')
new:SELECT table_name
FROM all_tables
WHERE owner = UPPER('system')
AND table_name LIKE UPPER('%term%')
TABLE_NAME
------------------------------
TERM


Thank you