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

All we want for Christmas:  An open letter to Santa from a modern legal team  

All we want for Christmas:  An open letter to Santa from a modern legal team  

As legal professionals embracing digital transformation, our wish list is a bit different this year.

December 11, 2024 4 minute read

OpenText Intelligence Aviator: Your data’s new best friend 

OpenText Intelligence Aviator: Your data’s new best friend 

Creating a data-driven culture within enterprises is a challenge.

November 19, 2024 3 minute read

Supercharge Your Data Strategy with the Latest Insights on Data and AI

Supercharge Your Data Strategy with the Latest Insights on Data and AI

Introducing the 2024 CXO Insights Guide on Data & AI Guide

October 31, 2024 6 minute read

Stay in the loop!

Get our most popular content delivered monthly to your inbox.