How to view the definition of tables, views, indexes, stored procedures, and triggers in Oracle
View table definitions:
Sets long 999999
Select dbms_metadata.get_ddl ('table', upper ('& table_name') from dual;
View the view definition:
Select text from user_views where view_name = upper ('& view_name ');
View the index definition:
Select dbms_metadata.get_ddl ('index', upper ('& index_name') from dual;
Select index_name, index_type, table_owner, table_name from user_indexes where table_name = 'temp3 ';
View procedure definitions:
Select text from user_source where name = '& PROCEDURE_NAME ';
View the trigger definition:
Select trigger_body from user_triggers where trigger_name = '& trigger_name ';
Processing of single quotes and String concatenation during Oracle Storage
Oracle Stored Procedure learning notes
Tips for using temporary tables in Oracle stored procedures
Oracle stored procedure to export table structure
Oracle stored procedure and serialized write demo