How to change the data type of an existing column with "alter table" statements in ms sql server?



How to change the data type of an existing column with "alter table" statements in ms sql ..

Answer / Prashant Srivastava

To change the data type of an existing column using the ALTER TABLE statement in MS SQL Server, you can use the following syntax:nn```sqlnALTER TABLE TableNamenALTER COLUMN ColumnName datatype;n``` Replace `TableName` with your table name and `ColumnName` with the name of the column you want to change. Replace `datatype` with the new data type for the column.n

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is replication and database mirroring?

1 Answers  


What is field with example?

1 Answers  


How to delete a database in ms sql server?

1 Answers  


What is a data source or ds? : sql server analysis services, ssas

1 Answers  


What are the source of constraints?

0 Answers  


What is the significance of null value and why should we avoid permitting null values?

1 Answers  


What is data mart? : sql server analysis services, ssas

1 Answers  


Why use sub query in sql server and list out types of sub queries?

1 Answers  


Comment,Datatypes are unlimited

1 Answers   IBM,


What are user defined datatypes and when you should go for them?

1 Answers  


Can we add an identity column to decimal datatype?

1 Answers  


WHICH IS THE BEST INSTITUTE IN HYD FOR "ORACLE"?

3 Answers  


Categories