This file contains 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
SET xact_abort ON | |
GO | |
BEGIN TRANSACTION | |
GO | |
CREATE TABLE [dbo].[People] | |
( | |
[id] [INT] IDENTITY(1, 1) NOT NULL, | |
[name] [NVARCHAR](max) NOT NULL, | |
[timestamp] [TIMESTAMP] NOT NULL, | |
CONSTRAINT [PK_People] PRIMARY KEY CLUSTERED ( [id] ASC )WITH (pad_index = | |
OFF, statistics_norecompute = OFF, ignore_dup_key = OFF, allow_row_locks = | |
on, allow_page_locks = on) ON [PRIMARY] | |
) | |
ON [PRIMARY] | |
textimage_on [PRIMARY] | |
GO | |
if @@error != 0 raiserror('Error in script execution', 20, -1) with log | |
GO | |
CREATE PROCEDURE [dbo].[InsertPerson] @name NVARCHAR(max) | |
AS | |
BEGIN | |
INSERT INTO dbo.People | |
(NAME) | |
VALUES (@name); | |
END | |
GO | |
if @@error != 0 raiserror('Error in script execution', 20, -1) with log | |
GO | |
INSsssERT INTO dbo.Persons -- syntax error - 'INssSERT' instead of 'INSERT' | |
(NAME) | |
VALUES ('Dawid') | |
GO | |
if @@error != 0 raiserror('Error in script execution', 20, -1) with log | |
GO | |
COMMIT | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment