if not Exists(SELECT * FROM information_schema.tables where Table_name = 'PopularityBadge') begin create table PopularityBadge ( ID int Primary key, Code int not null, Mat_ID bigint references Matter(ID) not null, Taf_ID bigint references Tafsili(ID) not null, Pro_ID_Badge int references OtherProperties(ID) not null, Pro_ID_Tag int references OtherProperties(ID) null, Tarikh int not null, Saat int not null, Description nvarchar(1000) ) end