Bird
0
0

Which of the following is the correct syntax to create a view named CustomerView that selects all columns from the Customers table?

easy📝 Syntax Q3 of 15
SQL - Views
Which of the following is the correct syntax to create a view named CustomerView that selects all columns from the Customers table?
AVIEW CREATE CustomerView SELECT * FROM Customers;
BCREATE VIEW CustomerView AS SELECT * FROM Customers;
CSELECT * INTO CustomerView FROM Customers;
DCREATE TABLE CustomerView AS SELECT * FROM Customers;
Step-by-Step Solution
Solution:
  1. Step 1: Recall the syntax for creating views

    The correct syntax starts with CREATE VIEW, followed by the view name and AS keyword, then the SELECT query.
  2. Step 2: Match the syntax to options

    CREATE VIEW CustomerView AS SELECT * FROM Customers; matches the correct syntax exactly; others use incorrect keywords or order.
  3. Final Answer:

    CREATE VIEW CustomerView AS SELECT * FROM Customers; -> Option B
  4. Quick Check:

    View creation syntax = CREATE VIEW ... AS SELECT [OK]
Quick Trick: Use CREATE VIEW name AS SELECT ... to define views [OK]
Common Mistakes:
MISTAKES
  • Using CREATE TABLE instead of CREATE VIEW
  • Using SELECT INTO which creates tables, not views
  • Incorrect keyword order in syntax

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes