Use of BINARY CHECKSUM

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 255
BINARY CHECKSUM is just like NEWID() function in Sql Server as it generates Random Values.It is used to educe the sort operation to perform on NEWID() function in Sql Server.The BINARY_CHECKSUM function generates a checksum value that is based on the values of the columns that we specify.

For Example:-
SELECT TOP 1 EMPLOYEE_ID

FROM EMPLOYEE_MASTER

WHERE (ABS(CAST(

(BINARY_CHECKSUM(*) *

RAND()) as int)) % 100) < 10

Comments or Responses

Login to post response