2022-06-01

How to create a candidate key alias in the select query from a view?

I have a view already in the snowflake which consisit of following columns

col1,
col2,
col3,
col4

i need to create a unique key with combination of below keys as alias, so that it would not actually create a unique key in the view

col1,
col2,
col3,

so somthing like

select unique(col1,col2,col3) as uniq_id from my view

i actually do want to store the 'uniq_id' in view. Is this possible in snowflake?



No comments:

Post a Comment