Skip to content

Instantly share code, notes, and snippets.

@petesql
Last active May 16, 2018 21:45
Show Gist options
  • Save petesql/a01cc13c8ed6079ed98732107b30b7fb to your computer and use it in GitHub Desktop.
Save petesql/a01cc13c8ed6079ed98732107b30b7fb to your computer and use it in GitHub Desktop.
who_is_active_tutorial
--Create a test database.
CREATE DATABASE myDatabase
--Change database context.
USE myDatabase
GO
--Create a test table.
CREATE TABLE myTable ( firstname VARCHAR(50), surname VARCHAR(50), email VARCHAR(255) )
--Start explicit transaction but do not commit.
BEGIN TRANSACTION
INSERT INTO myTable VALUES ( 'pete', 'whyte', '[email protected]' )
--COMMIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment