-- query_table_columns.sql
-- Appendix H, Oracle Database XE PHP Web Programming
-- by Michael McLaughlin
--
-- This script demonstrates how to query the columns that define
-- a table using an Oracle metadata view.


SPOOL query_table_columns.log

SET ECHO ON
SET FEEDBACK ON
SET NULL '<Null>'
SET PAGESIZE 999
SET SERVEROUTPUT ON

SELECT   column_id
,        column_name
,        data_type
,        nullable
FROM     user_tab_columns
WHERE    table_name = 'MEMBER';

SPOOL OFF