Skip to content

Instantly share code, notes, and snippets.

@dsibinski
Last active November 15, 2017 20:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsibinski/b265d5a9494407df6049d5decb3c02b6 to your computer and use it in GitHub Desktop.
Save dsibinski/b265d5a9494407df6049d5decb3c02b6 to your computer and use it in GitHub Desktop.
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
CREATE PROCEDURE [dbo].[InsertPerson] @name NVARCHAR(max)
AS
BEGIN
INSERT INTO dbo.People
(NAME)
VALUES (@name);
END
GO
INSERT INTO dbo.Persons -- run-time error - dbo.Persons table does not exist
(NAME)
VALUES ('Dawid')
GO
COMMIT
GO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment