Full-stack dev quiz question #33

Full-stack dev quiz question #33

quiz

Have you used CHECKSUM function in SQL Server? Thirty third question verifies this knowledge.

 

 

 

Which queries will fail when you try to execute it against a SQL Server 2017 database? Choose all correct options:

  1. select checksum(2)
  2. select checksum(getDate(), 'OVdovudwkda4', 'ddsdg')
  3. select checksum(*)
    from sys.views
  4. select checksum(cast('abc' as text))
  5. declare @text nvarchar(max) = 'abcdefghijklmnoprstuvwxyzabcdefghijklmnoprstuvwxyzabcdefghijklmnoprstuvwxyzabcdefghijklmnoprstuvwxyzabcdefghijklmnoprstuvwxyzabcdefghijklmnoprstuvwxyzabcdefghijklmnoprstuvwxyzabcdefghijklmnoprstuvwxyzabcdefghijklmnoprstuvwxyzabcdefghijklmnoprstuvwxyzabcdefghijklmnoprstuvwxyzabcdefghijklmnoprstuvwxyz'
    select checksum(@text)

For the correct answer scroll down

.

.

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.

.

.

The correct answer is: d. For more information read Forget about BINARY_CHECKSUM in SQL Server!

If you like what I do, consider buying me a coffee :)

Buy me a coffeeBuy me a coffee