Suggest an editImprove this articleRefine the answer for “How do you create a view?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)A view is created with the `CREATE VIEW` command: the syntax is simple - `CREATE VIEW view_name AS SELECT columns FROM table WHERE condition`, after which it can be queried like a regular table. **Key point:** to update a view's logic, use `CREATE OR REPLACE VIEW` - this creates or replaces the view without dropping the old one first.Shown above the full answer for quick recall.Answer (EN)ImageA view is created with the `CREATE VIEW` command. The syntax is simple: ```sql CREATE VIEW view_name AS SELECT columns FROM table_name WHERE condition; ``` ### Example ```sql CREATE VIEW active_users AS SELECT id, name, email FROM users WHERE is_active = 1; ``` Now you can query it like a regular table: ```sql SELECT * FROM active_users; ``` To update a view's logic, use: ```sql CREATE OR REPLACE VIEW active_users AS SELECT id, name FROM users WHERE last_login > '2025-01-01'; ``` This creates or replaces the view without dropping the old one first.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.