The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.

Display View Column Data Types

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.


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

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)

Helpful Links:

Have fun!

Sign In or Register to comment.

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.