create view `narajwwa_shinsei2`.`v_engi_city` as select 
 `narajwwa_shinsei2`.`t_jigyousha_city`.`ID` AS `ID`
,`narajwwa_shinsei2`.`t_jigyousha_city`.`市町村CD` AS `市町村CD`
,`narajwwa_shinsei2`.`t_jigyousha_city`.`法人CD` AS `法人CD`
,`narajwwa_shinsei2`.`t_jigyousha_city`.`事業所CD` AS `事業所CD`
,`narajwwa_shinsei2`.`t_jigyousha_city`.`指定番号` AS `指定番号`
,`narajwwa_shinsei2`.`t_jigyousha_city`.`有効期限` AS `有効期限`
,`narajwwa_shinsei2`.`t_jigyousha_city`.`指定状態CD` AS `指定状態CD`
,`narajwwa_shinsei2`.`t_jigyousha_city`.`指定日` AS `指定日`
,`narajwwa_shinsei2`.`t_jigyousha_city`.`取消日` AS `取消日`
,`narajwwa_shinsei2`.`t_jigyousha_city`.`更新日` AS `更新日`
,`narajwwa_shinsei2`.`t_jigyousha_city`.`指定備考` AS `指定備考`
,`narajwwa_shinsei2`.`tcd_city`.`市町村名` AS `市町村名`
,`narajwwa_shinsei2`.`tcd_jigyousho`.`事業所名称` AS `事業所名称`
,`narajwwa_shinsei2`.`tcd_houjin`.`法人名称` AS `法人名称`
,`narajwwa_shinsei2`.`tcd_houjin`.`廃業CD` AS `廃業CD`
 from (((`narajwwa_shinsei2`.`t_jigyousha_city` join `narajwwa_shinsei2`.`tcd_city`
 on((`narajwwa_shinsei2`.`t_jigyousha_city`.`市町村CD` = `narajwwa_shinsei2`.`tcd_city`.`市町村CD`)))
 join `narajwwa_shinsei2`.`tcd_jigyousho`
 on(((`narajwwa_shinsei2`.`t_jigyousha_city`.`事業所CD` = `narajwwa_shinsei2`.`tcd_jigyousho`.`事業所CD`)
 and (`narajwwa_shinsei2`.`t_jigyousha_city`.`法人CD` = `narajwwa_shinsei2`.`tcd_jigyousho`.`法人CD`))))
 join `narajwwa_shinsei2`.`tcd_houjin`
 on((`narajwwa_shinsei2`.`tcd_jigyousho`.`法人CD` = `narajwwa_shinsei2`.`tcd_houjin`.`法人CD`)))
 order by `narajwwa_shinsei2`.`tcd_city`.`市町村CD`,`narajwwa_shinsei2`.`t_jigyousha_city`.`指定番号`


