CREATE TABLE [dbo].[ris_risks]
(
[ris_risk_id] [int] NOT NULL,
[ris_policy_id] [int] NOT NULL,
[ris_entrance_date] [date] NOT NULL,
[ris_last_risk_situation_id] [int] NULL,
[ris_situations_count] [smallint] NULL
) ON [PRIMARY]
ALTER TABLE [dbo].[ris_risks] ADD 
CONSTRAINT [PK_ris_risks] PRIMARY KEY CLUSTERED  ([ris_risk_id]) ON [PRIMARY]


GO


ALTER TABLE [dbo].[ris_risks] ADD CONSTRAINT [FK_ris_risks_pol_policies] FOREIGN KEY ([ris_policy_id]) REFERENCES [dbo].[pol_policies] ([pol_policy_id])
GO
