if Exists(SELECT * FROM information_schema.tables where Table_name = 'OtherProperties') begin print 'true' end else begin create table OtherProperties ( ID int primary key, Pro_ID int references OtherProperties (ID), Code int not null Default 0, Name nvarchar(200), Title nvarchar(200), Value nvarchar(2000), Dom_ID int references Domain (ID) not null, Price decimal(19,4) not null Default 0, Tarikh int not null Default 0, TarikhAz int not null Default 0, TarikhEla int not null Default 0, Priority int not null default 0, [Description] nvarchar(2000), Vaziat smallint, CodeKarbar int references Karbar(Code), TarikhSabt int not null default 0, SaatSabt smallint not null default 0, ) end if not Exists (Select * from OtherProperties where ID = -1) begin insert into OtherProperties(ID, Code,Title,Dom_ID) values(-1,1,'تعریف نشده',444) end