CREATE TABLE [#Contracts] ( [ContractId] [int] NOT NULL ...


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

CREATE TABLE [#Contracts] (  [ContractId] [int] NOT NULL  
, [ContractNumber] [varchar](50) NOT NULL  
, [SignDate] [datetime2](7) NULL  
, [EndDate] [datetime2](7) NULL  
, CONSTRAINT [PK_con_Contracts] PRIMARY KEY CLUSTERED ([ContractId] ASC) ); 

CREATE INDEX IX_con_Contracts_ContractNumber 
ON [#Contracts] (ContractNumber) INCLUDE (SignDate)


SELECT ContractId  
, ContractNumber  
, SignDate FROM #Contracts 
WHERE ContractNumber ='1234'

Enter Parameters

Switch to meta site
loading Hold tight while we fetch your results