GET_TABLE_INFO_REGEX Function

This function gets formatted metadata for one or more tables or views, specified with regex.

Syntax

FUNCTION apex_db_dictionary.get_table_info_regex (
    p_regex                      IN   VARCHAR2,
    p_owner                      IN   VARCHAR2         DEFAULT NULL,
    p_object_type                IN   VARCHAR2         DEFAULT NULL,
    p_include_constraints        IN   BOOLEAN          DEFAULT TRUE,
    p_include_indexes            IN   BOOLEAN          DEFAULT FALSE,
    p_include_comments           IN   BOOLEAN          DEFAULT TRUE,
    p_include_annotations        IN   BOOLEAN          DEFAULT TRUE,
    p_include_domains            IN   BOOLEAN          DEFAULT TRUE,
    p_include_virtual_columns    IN   BOOLEAN          DEFAULT FALSE,
    p_format                     IN   t_format_type    DEFAULT C_MARKDOWN )
    RETURN CLOB;

Parameters

Parameter Description
p_regex Regular expression used to search the tables and views e.g. '^EBA_' to find tables whose names start with EBA_. Use '.' to get all tables and views in the schema.
p_owner Owner of the tables and views (default is current user)
p_object_type Use 'TABLE' to only search table names and 'VIEW' to only search view names (default NULL for both tables and views).
p_include_constraints Show constraints section (default TRUE).
p_include_indexes Show indexes section (default FALSE).
p_include_comments Show table/column comments (default TRUE).
p_include_annotations Show table/column annotations (default TRUE).
p_include_domains Show SQL Domain metadata section (default TRUE).
p_include_virtual_columns Include virtual columns in output (default FALSE).
p_format c_markdown (default) or c_plain.

Returns

This function returns a CLOB containing formatted descriptions for all tables/views matching the regex.

Example

This example returns a CLOB containing formatted descriptions for all tables and views with names matching the regular expression ‘BUDGET|FORECASTS’.

declare
    l_text clob;
begin
    l_text := apex_db_dictionary.get_table_info_regex(
        p_regex => 'BUDGETS|FORECASTS' );
end;