Friday, February 28, 2014

คำสั่งสร้าง VIEW ข้อมูลประชากรข้ึนมาใหม่เพื่อคัดกรองคนตายออกไป

คำสั่งสร้าง VIEW ข้อมูลประชากรข้ึนมาใหม่เพื่อคัดกรองคนตายออกไป เพื่อจะนำ VIEW ที่สร้างขึ้นไปใช้ประโยชน์ต่อไป
CREATE VIEW PERSONNOTDEATH (prename,fname,lname,birth,mumoi,hnomoi,sex,pid,idcard) as
SELECT person.prename,person.fname,person.lname,person.birth,person.mumoi,person.hnomoi,person.sex,person.pid,person.idcard
FROM person LEFT JOIN persondeath ON person.pid = persondeath.pid
WHERE (((persondeath.pid) Is Null));

No comments:

Post a Comment