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!

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.