if (select count(*) from PermissionTags where TagNo=5020 and "Type"=1200) =0 then insert into PermissionTags(TagNo,"Type",Note) values(5020,1200,''); end if;