CREATE TABLE BasicPremiumJoint (
	[PlanInternalNo] [int] NOT NULL ,
	[BasicPremiumInternalNo] [int] NOT NULL ,
	[Age] [tinyint] NOT NULL DEFAULT (0),
        [JointAge] [tinyint] NOT NULL DEFAULT (0),
	[Term] [smallint] NOT NULL DEFAULT (0),
	[PremiumPayingTerm] [smallint] NOT NULL DEFAULT (0),
	[Amount] [money] NOT NULL DEFAULT (0),
	[StartDate] [datetime] NOT NULL ,
	[EndDate] [datetime] NOT NULL ,
	[FromSumAssured] [money] NOT NULL DEFAULT (0),
	[ToSumAssured] [money] NOT NULL DEFAULT (0),
	[ApplicableFromYear] [smallint] NOT NULL DEFAULT (0),
	[PlanOption] [int] NOT NULL DEFAULT (0),
	PRIMARY KEY  NONCLUSTERED 
	(
		[PlanInternalNo],
		[BasicPremiumInternalNo]
	)  ON [PRIMARY] ,
	FOREIGN KEY ([PlanInternalNo]) REFERENCES [InsurancePlan] ([PlanInternalNo]),
	 CHECK ([BasicPremiumInternalNo] > 0),
	 CHECK ([PlanInternalNo] > 0),
	 CHECK ([PremiumPayingTerm] >= 0),
	 CHECK ([Term] >= 0),
	 CHECK ([Age] >= 0),
	 CHECK ([JointAge] >= 0)
) ON [PRIMARY]

Update InsurancePlan Set HighlightColor = '$00FCFBE0' where PlanInternalNo = 888
