This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- The gist of it: | |
| -- Use HASHBYTES('SHA1', @input); instead of CHECKSUM(@input); if you are interested | |
| -- in using hashes to detect code changes. | |
| -- oops! I deleted too many records | |
| DECLARE @old_proc_definition VARCHAR(MAX) = ' | |
| DELETE FROM dbo.transactions | |
| WHERE txn_id < 10000000000000000; | |
| '; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- required SET options for indexed view | |
| SET ANSI_NULLS ON; | |
| SET ANSI_PADDING ON; | |
| SET ANSI_WARNINGS ON; | |
| SET CONCAT_NULL_YIELDS_NULL ON; | |
| SET NUMERIC_ROUNDABORT OFF; | |
| SET QUOTED_IDENTIFIER ON; | |
| SET ARITHABORT ON; | |
| -- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- schema | |
| --DROP TABLE dbo.common_Text; | |
| --DROP TABLE dbo.common_LanguageType; | |
| --DROP TABLE dbo.common_Comment; | |
| CREATE TABLE dbo.common_Comment ( | |
| CommentId BIGINT NOT NULL PRIMARY KEY | |
| ); | |
| CREATE TABLE dbo.common_LanguageType ( |
NewerOlder