Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Automating random inserts into a memory optimized table

$
0
0
HiI have this tableCREATE TABLE [Sales].[Test_inmem]( [c1] [int] NOT NULL, [c2] [nvarchar](20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [ModifiedDate] [datetime2](7) NOT NULL CONSTRAINT [IMDF_Test_ModifiedDate] DEFAULT (sysdatetime()),CONSTRAINT [IMPK_Test_SpecialOfferID_ProductID] PRIMARY KEY NONCLUSTERED ( [c1] ASC),INDEX [ix_Test] NONCLUSTERED ( [c1] ASC))WITH ( MEMORY_OPTIMIZED = ON , DURABILITY = SCHEMA_AND_DATA )I have to generate 1000000 random records into it.I tried various ways to insert records, but not being a developer could not do it.I hope to make the C1 as a serial number, C2 can be anything, C3 I want to be the timestamp.

Viewing all articles
Browse latest Browse all 3145

Trending Articles