if Exists(SELECT * FROM information_schema.tables where Table_name = 'Aghsat') begin print 'true' end else begin create table Aghsat ( Code int Primary key, CodeBargeh int not null, Noe smallint not null, -- Daryafti Ya Pardakhti TarikhGhest int not null, CodeMoshtari bigint references Tafsili (Code)not null, CodeFarayandMoshtari int references Farayand(Code), CodeSandoogh bigint references Tafsili (Code), CodeFarayandSandoogh int references Farayand(Code), Mablagh decimal(19,4) not null, Sharh nvarchar(200), Vaziat smallint not null, CodeDaryaftPardakht int, CodeKarbar int references Karbar (Code) not null, TarikhSabt int not null, SaatSabt smallint not null ) end