Why is rowversion null column semantically equivalent to varbinary (8)?

This MSDN page reports:

An invalid rowversion column is semantically equivalent to a binary (8) column. A column with a row zero column is semantically equivalent to a varbinary (8) column.

Given that an immutable rowversion column is semantically equivalent to a binary (8) column, why is a graph with a rowversion null column semantically equivalent to a varbinary (8) column and not a nullable column (8)?

Does this mean that a column with zero number of rows is not semantically semantically equivalent to a column with zero binary code (8)?

My specific example: I will have a table that will contain copies of rows from other tables. Some source tables have rowversion, while others do not. Therefore, the "rowversion" column in my table should be NULL. I want to understand why (or if) the column should be varbinary (8) null instead of binary (8) null.

+6
source share
1 answer

Binary (8) is a binary code that has EXACTLY 8 bytes. Varbinary (8) is a binary code that has up to 8 bytes. The null value is 0 bytes. It must be a form that can have 0 or 8 bytes. So it should be varbinary.

+1
source

Source: https://habr.com/ru/post/946771/


All Articles