Unlike the other databases Teradata and Oracle, We need to get the view definition in POSTGRE database from pg_views table.
Query:
SELECT definition FROM pg_views WHERE viewname='<View_name>';
The above query will give us the complete view definition.
To see only columns and it's datatypes, we can use below:
\d+ <view_name>;
Query:
SELECT definition FROM pg_views WHERE viewname='<View_name>';
The above query will give us the complete view definition.
To see only columns and it's datatypes, we can use below:
\d+ <view_name>;
Comments
Post a Comment