Example : ตัวอย่างการสร้าง View แบบง่าย ๆ บน SQL Server Database
CREATE VIEW [VIEW_CUSTOMER_INFO]
AS
SELECT A.CUSTOMER_ID, A.NAME, B.COUNTRY_NAME, A.BUDGET, A.USED, COUNT(C.AUDIT_ID) AS ITEM_AUDIT
FROM CUSTOMER AS A LEFT OUTER JOIN
COUNTRY AS B ON A.COUNTRY_CODE = B.COUNTRY_CODE LEFT OUTER JOIN
AUDIT AS C ON A.CUSTOMER_ID = C.CUSTOMER_ID
GROUP BY A.CUSTOMER_ID, A.NAME, B.COUNTRY_NAME, A.BUDGET, A.USED