System Message
select p.* ,concat(p.fname,' ',p.lname) as person_name,pc.name as pttype_name,x.name as sex_name ,n.name as nationality_name, e.name as education_name ,o.name as occupation_name,r.name as religion_name , y.name as marrystatus_name ,t.house_regist_type_name from person p left outer join pcode pc on pc.code = p.pcode left outer join sex x on x.code = p.sex left outer join nationality n on n.nationality = p.nationality left outer join education e on e.education = p.education left outer join occupation o on o.occupation = p.occupation left outer join religion r on r.religion = p.religion left outer join marrystatus y on y.code = p.marrystatus left outer join house_regist_type t on t.house_regist_type_id = p.house_regist_type_id where p.house_id = 276 and p.death='N'