Created
September 12, 2022 21:00
-
-
Save nuria/5fba9f7517114bdff6961bb0838aa963 to your computer and use it in GitHub Desktop.
Build alter table clause from meta data redshift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select 'alter table ' || table_schema || '.' || table_name || ' alter column experiment_assignments type varchar(65535);' | |
from svv_columns | |
where table_schema = 'some' | |
and column_name = 'some' | |
and character_maximum_length = 512; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment