alter table Garantor alter column [Birth Date] int
答案 0 :(得分:2)
尝试这样的事情(您需要创建一个新列,使用转换更新它,删除旧列,然后使用旧名称重命名新列)
ALTER TABLE dbo.Garantor
ADD newBirthDate int NOT NULL DEFAULT 0 -- NULL and DEFAULT as required
GO
UPDATE dbo.Garantor
SET newBirthDate = CAST([Birth Date] AS int) -- or CONVERT function, it will do the same
GO
ALTER TABLE dbo.Garantor
DROP COLUMN [Birth Date]
GO
SP_RENAME 'dbo.Garantor.newBirthDate', 'dbo.Garantor.[Birth Date]'
GO