if not Exists(SELECT * FROM information_schema.tables where Table_name = 'SalaryTimecardRelation') begin create table SalaryTimecardRelation ( ID int primary key identity(1,1), ST_ID int references SalaryTimecard(ID) not null, PEE_ID int references PersenelEnterExit(ID) null, TCA_ID int references TimeCardActivity(ID) null ) end;