ตรวจสอบรหัสพื้นฐานเปรียบเทียบกับ รหัส OPPP2556
อาชีพ
select occupation from occupation
where nhso_code not in (select code from provis_occupa)
select * from occupation
where nhso_code not in (select code from provis_occupa)
select hn,pname,fname,lname,occupation from patient
where occupation not in(select occupation from occupation)
select hn,pname,fname,lname,occupation from patient
where occupation is null
update patient set occupation="999"
where occupation not in(select occupation from occupation)
update patient set occupation="999"
where occupation is null