ang_coder
ang_coder

Reputation: 173

How to alter a snowflake table to drop a field in VARIANT data type?

I have a snowflake table with a VARIANT column. Can I alter my table to drop one of the fields in Variant column?

I tried

ALTER TABLE TABLENAME
        DROP COLUMN VARIANTDATA:FIELDNAME;

It gave me syntax error.

Upvotes: 0

Views: 624

Answers (1)

Iqra Ijaz
Iqra Ijaz

Reputation: 281

Anything a VARIANT column contains is considered a value just as any structured column. And you cannot drop a column value/Data using DDL statement.

https://docs.snowflake.com/en/sql-reference/data-types-semistructured.html#variant

Upvotes: 2

Related Questions