if not exists (select * from t_sys_system where sys_var_id = 'pos_default_payall') begin insert into t_sys_system (sys_var_id, sys_var_name, sys_var_value,branch_no) values('pos_default_payall','前台结算支持默认付全款','1','000'); end else update t_sys_system set sys_var_value ='1' where sys_var_id = 'pos_default_payall' GO