“Snowflake Alter Data Type” Respostas de código

Snowflake Alter Data Type

alter table t1 alter c4 set data type varchar(50)
Garo_Gorille

Alterar o tipo de neve do tipo coluna

alter table TABLE_NAME add column TEMP_COLUMN TIMESTAMP_LTZ(9);

update TABLE_NAME t1
  set t1.TEMP_COLUMN = TO_TIMESTAMP_LTZ(t2.TIMESTAMP_NTZ_COLUMN_NAME)
  from TABLE_NAME t2
  where t1.TEMP_COLUMN = t2.TIMESTAMP_NTZ_COLUMN_NAME

// if you don't want troubles create a new copy of table and use SWAP WITH instead
alter table aws_config rename column TIMESTAMP_NTZ_COLUMN_NAME to TIMESTAMP_NTZ_COLUMN_NAME_OLD;
alter table aws_config rename column TEMP_COLUMN to TIMESTAMP_NTZ_COLUMN_NAME;

alter table aws_config drop column TIMESTAMP_NTZ_COLUMN_NAME_OLD
Danny Mor

Respostas semelhantes a “Snowflake Alter Data Type”

Perguntas semelhantes a “Snowflake Alter Data Type”

Mais respostas relacionadas para “Snowflake Alter Data Type” em Sql

Procure respostas de código populares por idioma

Procurar outros idiomas de código