Skip to content

Instantly share code, notes, and snippets.

@jeremyforan
Created January 3, 2023 21:16
Show Gist options
  • Save jeremyforan/6099b8a333a1e74c33e78bba8623056b to your computer and use it in GitHub Desktop.
Save jeremyforan/6099b8a333a1e74c33e78bba8623056b to your computer and use it in GitHub Desktop.
create database migrationdemo;
GO
use migrationdemo
GO
create table earth (
id int identity(1,1) primary key,
node hierarchyid,
name varchar(20)
)
GO
INSERT INTO earth (node, name)
VALUES
('/', 'earth'),
('/1/', 'africa'),
('/2/', 'northamerica'),
('/2/1/', 'canada'),
('/2/2/', 'usa');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment