Saturday, March 5, 2022

How to change datatype of single or multiple column(s) in table in SQL server

For single column

 ALTER TABLE table_name

ALTER COLUMN column_name datatype;


----------------------------------------------------------------
For multiple columns

ALTER TABLE MST_TP_REGISTRATION ALTER COLUMN TP_Acct_Bene_Name VARCHAR(100) 

ALTER TABLE MST_TP_REGISTRATION ALTER COLUMN TP_Acct_Bene_Name_PAN VARCHAR(100)

No comments:

Post a Comment