i am not very sure is it different as in SQL where yu can go to the database that you want and then you go to the table and then you click the right side of yur mouse and go to design table and change it
In case you still need to change the table's column type from T-SQL , the sintax for MS SQL is:
ALTER TABLE table ALTER COLUMN column_name new_data_type
ALTER TABLE MyTable ALTER COLUMN MyColumn NVARCHAR(20)
I know this is old, but you know good old Google...
You must first parse the data in the column to ensure that all values will 'implicitly' convert to the new data type.
simple sql to review all rows that will not convert:
SELECT <column> WHERE IsNumeric(<column>) = 0
Once all values in the column can be implicitly converted to the new data type, the alter column statement will complete.
For other readers, note that certain data types and values can only be implicitly converted to specific types and this method may require first a conversion to varchar and then to your desired type.
For some types, you will not be able to use implicit conversion at all, in these cases you will may need to do it the MS way... write the data out to a temp table, drop rows, alter table then write back the rows...
Some data types need you to define the seed number or how many decimal places you want to store. Taking this into account do some research on the decimal datatype as you have to define how many decimal places you want to store if you want to use decimal datatype.
I've developed an app that takes the data in a text file and moves it to specific columns in an Excel file. My computer has the Excel 2010 installed. So the application works fine with no issues. However we've begun to upgrade computers and software in the office ...