Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

alter column type

ALTER TABLE schema.table
    ALTER COLUMN column
    DROP DEFAULT;
ALTER TABLE schema.table
    ALTER COLUMN column TYPE INTEGER[]
    USING array[column]::INTEGER[];
ALTER TABLE schema.table
    ALTER COLUMN column SET DEFAULT '{}';
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #alter #column #type
ADD COMMENT
Topic
Name
1+3 =