Is rowversion not a valid data type in SQL Server 2008 R2?
-
18-04-2021 - |
문제
Is rowversion
not a valid data type in Microsoft SQL Server 2008 R2?
Bonus Chatter
i'm trying to add a rowversion
column to a table:
But when i try to leave the "Data Type" column, SQL Server Management Studio complains
Invalid data type.
and insists that i pick a different data type:
How do i make a column rowversion
when rowversion
is not a valid data type?
Bonus Viewing
Bonus Reading
rowversion (Transact-SQL)
timestamp is the synonym for the rowversion data type and is subject to the behavior of data type synonyms. In DDL statements, use rowversion instead of timestamp wherever possible. For more information, see Data Type Synonyms (Transact-SQL).
The timestamp syntax is deprecated. This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
Additional Bonus Chatter
해결책
SQL Server 2008 R2 accepts ROWVERSION as datatype for columns in CREATE TABLE statements, however the SSMS seems to lag behind and the designer refuses to accept the input.
다른 팁
If it's any help, the Visual Studio 2012 SQL Server Object Explorer designer does have the rowversion option (even though the VS 2012 Server Explorer Data Connections designer doesn't either).
"The timestamp syntax is deprecated. This feature will be removed in a future version of Microsoft SQL Server. " so i think timestamp =rowversion .so you dont need rowversion.