| | |
Changing the datatype of a Column
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2005
Posts: 13
Reputation:
Solved Threads: 0
G'd evening!
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
Ex.
ALTER TABLE MyTable ALTER COLUMN MyColumn NVARCHAR(20)
For more about the Alter Table sintax, read the books on line (BOL), here is the last update for SQL 2k SQL Server Books Online January 2004 Update
Good luck
Estuardo
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
Ex.
ALTER TABLE MyTable ALTER COLUMN MyColumn NVARCHAR(20)
For more about the Alter Table sintax, read the books on line (BOL), here is the last update for SQL 2k SQL Server Books Online January 2004 Update
Good luck
Estuardo
![]() |
Similar Threads
- C++ enumerated data type help (C++)
- SQL Create table error (ASP.NET)
- dynamic td's not tr's (ColdFusion)
- Good Luck w/This one: Excel Question VBA/Macro/other (MS Access and FileMaker Pro)
Other Threads in the MS SQL Forum
- Previous Thread: MS SQL: Converting row printing to column based printing
- Next Thread: how to delete duplicate record in a table by using SQL query
| Thread Tools | Search this Thread |





