My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 43 attachment: init-mssql.sql (511 bytes)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CREATE TABLE [test1] (
[id] bigint NOT NULL IDENTITY,
[name] varchar(100),
[ref] bigint
)
GO

CREATE TABLE [test2] (
[id] bigint NOT NULL IDENTITY,
[name] varchar(100)
)
GO

ALTER TABLE [test1] ADD CONSTRAINT PK_test1 PRIMARY KEY ([id])
ALTER TABLE [test2] ADD CONSTRAINT PK_test2 PRIMARY KEY ([id])

ALTER TABLE [test1]
ADD CONSTRAINT FK_test1_ref FOREIGN KEY ([ref])
REFERENCES [test2] ([id])

Powered by Google Project Hosting