Using Views for Security

Views abstract the underlying table structure and restrict access to sensitive data.


CREATE VIEW public_user_data AS
SELECT user_id, user_name FROM users;