Created
February 19, 2013 23:19
-
-
Save SidShetye/4991185 to your computer and use it in GitHub Desktop.
Test script to create a dummy table to check SQL server 2012's AES crypto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [TestDb] | |
GO | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
CREATE TABLE [dbo].[CreditCard]( | |
[CreditCardID] [int] IDENTITY(1,1) NOT NULL, | |
[CardType] [nvarchar](50) NOT NULL, | |
[CardNumber] [nvarchar](25) NOT NULL, | |
[ExpMonth] [tinyint] NOT NULL, | |
[ExpYear] [smallint] NOT NULL, | |
[ModifiedDate] [datetime] NOT NULL, | |
CONSTRAINT [PK_CreditCard_CreditCardID] PRIMARY KEY CLUSTERED | |
( | |
[CreditCardID] ASC | |
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] | |
) ON [PRIMARY] | |
GO | |
SET IDENTITY_INSERT [dbo].[CreditCard] ON | |
INSERT [dbo].[CreditCard] ([CreditCardID], [CardType], [CardNumber], [ExpMonth], [ExpYear], [ModifiedDate]) VALUES (1, N'SuperiorCard', N'1', 11, 2006, CAST(0x0000999A00000000 AS DateTime)) | |
INSERT [dbo].[CreditCard] ([CreditCardID], [CardType], [CardNumber], [ExpMonth], [ExpYear], [ModifiedDate]) VALUES (2, N'Distinguish', N'1', 8, 2005, CAST(0x00009A1B00000000 AS DateTime)) | |
INSERT [dbo].[CreditCard] ([CreditCardID], [CardType], [CardNumber], [ExpMonth], [ExpYear], [ModifiedDate]) VALUES (3, N'ColonialVoice', N'1', 7, 2005, CAST(0x00009A4300000000 AS DateTime)) | |
GO | |
SET IDENTITY_INSERT [dbo].[CreditCard] OFF | |
ALTER TABLE [dbo].[CreditCard] ADD CONSTRAINT [DF_CreditCard_ModifiedDate] DEFAULT (getdate()) FOR [ModifiedDate] | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment