Skip to content

Instantly share code, notes, and snippets.

@jesuslpm
Created September 11, 2014 08:39
Show Gist options
  • Select an option

  • Save jesuslpm/1ab0a44a32fba5fa4bad to your computer and use it in GitHub Desktop.

Select an option

Save jesuslpm/1ab0a44a32fba5fa4bad to your computer and use it in GitHub Desktop.
RavenDB to SQL Server sql script sample
CREATE TABLE [dbo].[OrderLines]
(
[Id] int IDENTITY CONSTRAINT PK_OrderLines PRIMARY KEY NONCLUSTERED,
[OrderId] [nvarchar](50) NOT NULL,
[Qty] [int] NOT NULL,
[Product] [nvarchar](255) NOT NULL,
[Cost] [int] NOT NULL
);
CREATE CLUSTERED INDEX IX_OrderLines_OrderId
ON [dbo].[OrderLines]([OrderId]);
CREATE TABLE [dbo].[Orders]
(
[Id] [nvarchar](50) NOT NULL CONSTRAINT PK_Orders PRIMARY KEY,
[OrderLinesCount] [int] NOT NULL,
[TotalCost] [int] NOT NULL
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment