[load_grdList]
select
  m1.kino_id
, m1.kino_nm
, (case when(m2.kino_id is not null)then(1)else(0) end) as checkbox
from v_kino m1
left join m_kengen m2 on (m2.auth_kbn = ':auth_kbn' and m2.kino_id = m1.kino_id)
order by m1.sort_key, m1.kino_id

[existKengen]
select
  m1.kino_id
, m1.kino_nm
, (case when(m2.kino_id is not null)then(1)else(0) end) as checkbox
from v_kino m1
left join m_kengen m2 on (m2.auth_kbn = '98' and m2.kino_id = m1.kino_id)
;

[updateBeforeChecked]
delete from m_kengen
where auth_kbn = ':auth_kbn'

[updateRecord]
insert into m_kengen (
auth_kbn, kino_id, riyo_kbn, del_flg, cre_id, cre_time, upd_id, upd_time
) values (
':auth_kbn', ':kino_id', '1', 0, ':login_id', now(), ':login_id', now()
)


