2026-03-12 20:23:15
This commit is contained in:
52
vg/desc.sql
Normal file
52
vg/desc.sql
Normal file
@@ -0,0 +1,52 @@
|
||||
@@header
|
||||
|
||||
/*
|
||||
*
|
||||
* Author : Vishal Gupta
|
||||
* Purpose : Describe an object
|
||||
* Parameters : 1 - Object Name in OWNER.OBJECT_NAME format.
|
||||
*
|
||||
*
|
||||
* Revision History:
|
||||
* ===================
|
||||
* Date Author Description
|
||||
* --------- ------------ -----------------------------------------
|
||||
* 13-Feb-12 Vishal Gupta First cut
|
||||
*/
|
||||
|
||||
|
||||
DEFINE object_name="&&1"
|
||||
|
||||
COLUMN owner FORMAT a20
|
||||
COLUMN object_name FORMAT a30
|
||||
COLUMN object_type FORMAT a20
|
||||
|
||||
VARIABLE object_type VARCHAR2(30)
|
||||
|
||||
------------------------------
|
||||
-- Find out the object type
|
||||
------------------------------
|
||||
BEGIN
|
||||
:object_type := '';
|
||||
--FOR i in (
|
||||
SELECT
|
||||
--owner, object_name,
|
||||
object_type
|
||||
INTO :object_type
|
||||
FROM dba_objects
|
||||
WHERE owner || '.' || object_name = UPPER('&&object_name') ;
|
||||
--dbms_describe.describe_procedure(object_name =>
|
||||
END;
|
||||
/
|
||||
|
||||
print :object_type
|
||||
------------------------------
|
||||
-- Describe the object
|
||||
------------------------------
|
||||
|
||||
set lines 80
|
||||
desc &object_name
|
||||
@@header
|
||||
@@tab_indexes &object_name
|
||||
|
||||
@@footer
|
||||
Reference in New Issue
Block a user