text: ﻿Create Table [ACT].[AccountTypes]
  (
  	[TypeId] Int Not Null Default Indentity(1,1),
  	[Type] Varchar(55) Not Null,
  	[TitleOnStatement] Varchar(255) Not Null,
      [Added] DateTime Default Current_Timestamp,
      [Modified] DateTime Default Current_Timestamp,
  
  	Constraint PkAccountType Primary Key([TypeId], [Type]),
  	Constraint UnqAccountType Unique([Type])
  )
  Go
  
  -- This trigger is reponsbile for Updating Modification Date 
  -- On Account Types Table
  Create Trigger [ACT].[AccountTypesModification]
  On [ACT].[AccountTypes]
  After Update
  As 
  	Update 
  		[ACT].[AccountTypes]
  	Set 
  		[Modified] = CURRENT_TIMESTAMP
  	From
  		[inserted] Inner Join [deleted]  On [deleted].[TypeId] = [inserted].[TypeId]
  	Where 
  		[inserted].[TypeId] Is Not Null And 
  		[deleted].[TypeId] Is Not Null And
  		[ACT].[AccountTypes].[TypeId] = [inserted].[TypeId] And 
  		[ACT].[AccountTypes].[TypeId]= [deleted].[TypeId]
  Go
  