if (select count(0) from SystemSetting where SettingKey = 'CP_TEST_SETTING') = 0 begin insert into SystemSetting(SettingKey, SettingCategoryId, SettingValueBit, TypeFlag) values ('CP_TEST_SETTING', 1, 1, 4) end go