select
id
from epc_master_define
where code = #{code}
and data_start = 0
select
distinct
code , name, DESCRIPTION, type
,(select meCode.code from epc_master_element meCode where meCode.define_code = md.code and meCode.DEL_FLAG = 1 and meCode.ALIAS = 'code') ELECODE
,(select meCode.code from epc_master_element meCode where meCode.define_code = md.code and meCode.DEL_FLAG = 1 and meCode.ALIAS = 'value') ELEVALUE
from epc_master_define md
and type = #{type}
and del_flag = 0
ID,CODE,NAME,DESCRIPTION,TYPE,DEL_FLAG,INS_P,INS_T,UPD_P,UPD_T,TENANT_ID,DATA_START
SELECT
a.id ,
a. CODE ,
a. NAME ,
b.define_code ,
b.id bId,
b. CODE bCode,
b. NAME bName,
b.ALIAS alias
FROM
epc_master_define a
LEFT JOIN epc_master_element b ON a. CODE = b.define_code
a.NAME = #{name}
and a.id = #{id}
and a.CODE = #{code}
SELECT
a.id,
a. CODE ,
a. NAME ,
b.define_code,
b.id bId,
b. CODE bCode,
b. NAME bName
FROM
epc_master_define a
LEFT JOIN epc_master_element b ON a. CODE = b.define_code
a.NAME = #{master.name}
delete from epc_master_define
SELECT
id,
CODE,
NAME,
TYPE,
DEL_FLAG
FROM
epc_master_define
WHERE
DEL_FLAG =0
and NAME LIKE CONCAT('%',#{master.name},'%')
and config_type = #{master.configType}
delete from
epc_master_define
where
code=#{code}
SELECT code FROM epc_master_define where code=#{code}