what data type i should use for roversion col and can i use less than greater

  • can i use Rowversioncol ( in my database it's synonyme timestamp is used) to run the following query to find all inseted after this @LastKnownRowVersion;

    SELECT * FROM YourTable

    WHERE RowVersionCol > @LastKnownRowVersion;

    data type i should use for @LastKnownRowVersion; why i am asking is because i read this from

    "A nonnullable rowversion column is semantically equivalent to a binary(8) column. A nullable rowversion column is semantically equivalent to a varbinary(8) column."

    https://learn.microsoft.com/en-us/sql/t-sql/data-types/rowversion-transact-sql?view=sql-server-ver17

    q2) what should i do if i have non null roversioncol and if i have null roversion col.

Viewing post 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply