Skip to content

Instantly share code, notes, and snippets.

@danielyewright
Created September 22, 2016 17:01
Show Gist options
  • Save danielyewright/fd7323b16a41a9349483556693193614 to your computer and use it in GitHub Desktop.
Save danielyewright/fd7323b16a41a9349483556693193614 to your computer and use it in GitHub Desktop.
Updates a column's values with a hash based on another column's data
UPDATE Customers SET client_id = HASHBYTES('SHA1', CONVERT(VARCHAR(12), PKEY))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment