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 min 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

The Agentic AI Genome: Turning AI investment into enterprise advantage

The Agentic AI Genome: Turning AI investment into enterprise advantage

Read about how to unleash the power of AI

April 10, 2026

4 min read

Elevate together at OpenText Summit London 2026

Elevate together at OpenText Summit London 2026

Take control of your AI journey

April 09, 2026

3 min read

Come to OpenText Summit Paris 2026

Come to OpenText Summit Paris 2026

Join us this April in the City of Light

April 08, 2026

3 min read

Stay in the loop!

Receive regular insights, updates, and resources—right in your inbox.