Display View Column Data Types: Quick Tip

Like table columns, view columns also have a data type. You can display the data types of view columns by querying the VIEW_COLUMNS system table….

OpenText profile picture
OpenText

October 25, 20181 minute read

Like table columns, view columns also have a data type. You can display the data types of view columns by querying the VIEW_COLUMNS system table.

Example:

dbadmin=> CREATE VIEW MyAccount_View AS SELECT * FROM public.MyAccount;
CREATE VIEW

dbadmin=> SELECT column_name, data_type FROM view_columns
WHERE table_schema = ‘public’ AND table_name = ‘MyAccount_View’
AND column_name IN (‘LateFeesDue’, ‘DaysInYear’);

column_name | data_type
————-+—————
LateFeesDue | numeric(18,4)
DaysInYear | int
(2 rows)

Have fun!

Share this post

Share this post to x. Share to linkedin. Mail to
OpenText avatar image

OpenText

OpenText, The Information Company, enables organizations to gain insight through market-leading information management solutions, powered by OpenText Cloud Editions.

See all posts

More from the author

Manutan combines digital services with the human touch to delight customers

Manutan combines digital services with the human touch to delight customers

At Manutan, we equip businesses and communities with the products and services they require to succeed. Headquartered in France, our company has three divisions, serving…

4 minute read

Reaching new markets in Europe and beyond

Reaching new markets in Europe and beyond

How information management specialists at One Fox slashed time to market for innovative products with OpenText Cloud Platform Services At One Fox, we’ve driven some…

4 minute read

SoluSoft helps government agencies tackle fraud faster

SoluSoft helps government agencies tackle fraud faster

Fraud, in all its forms, is a pervasive problem, spanning industries and preying on vulnerabilities in federal and state government systems. Each year in the…

3 minute read

Stay in the loop!

Get our most popular content delivered monthly to your inbox.