In this blog. I will explain you how to find random record in SQL server. This is most common interview question. The CHECKSUM function returns the checksum value computed over a table row, or over an expression list. Use CHECKSUM to build hash indexes. A hash index will result if the CHECKSUM function has column arguments, and an index is built over the computed CHECKSUM value. This can be used for equality searches over the columns. SQL NEWID function is used for selecting random row from a result set in SQL Server databases. NEWID is use to assign a value to a variable declared as the uniqueidentifier data type.
source https://www.c-sharpcorner.com/Blogs/how-to-find-random-record-in-sql-server
No comments:
Post a Comment