Last active
November 11, 2019 09:08
-
-
Save ganapathichidambaram/14dd8d650cf3d23816a9fc4a65dba879 to your computer and use it in GitHub Desktop.
Alter Postgresql table column to varchar from integer or other datatype
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
-- SQL : PostgreSQL | |
-- tablename - Name of the table which we want to alter the column | |
-- columnname - Name of the columnn which we want to change to varchar from other datatype. | |
ALTER TABLE | |
tablename | |
ALTER COLUMN | |
columnname type varchar using columnname::varchar; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment