Database Management
MySQL
Subjective
Oct 01, 2025
What are views in MySQL and their advantages?
Detailed Explanation
Views are virtual tables based on SQL queries that don't store data physically.
Advantages:
• Data security (hide sensitive columns)
• Simplify complex queries
• Data abstraction
• Consistent interface
Example:
CREATE VIEW active_users AS
SELECT id, name, email
FROM users
WHERE status = 'active';
SELECT * FROM active_users; -- Uses the view
Discussion (0)
No comments yet. Be the first to share your thoughts!
Share Your Thoughts