Bird
0
0

Which of the following is the correct syntax to create a view named CustomerView showing id and name 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 showing id and name from the Customers table?
ACREATE TABLE CustomerView AS SELECT id, name FROM Customers;
BMAKE VIEW CustomerView SELECT id, name FROM Customers;
CCREATE VIEW CustomerView AS SELECT id, name FROM Customers;
DVIEW CREATE CustomerView AS SELECT id, name FROM Customers;
Step-by-Step Solution
Solution:
  1. Step 1: Recall the correct syntax for creating a view

    The correct syntax starts with CREATE VIEW, followed by the view name, AS, and the SELECT query.
  2. Step 2: Check each option

    Only CREATE VIEW CustomerView AS SELECT id, name FROM Customers; matches the correct syntax exactly.
  3. Final Answer:

    CREATE VIEW CustomerView AS SELECT id, name FROM Customers; -> Option C
  4. Quick Check:

    Correct view syntax = CREATE VIEW CustomerView AS SELECT id, name FROM Customers; [OK]
Quick Trick: Use CREATE VIEW ... AS SELECT ... to define views [OK]
Common Mistakes:
MISTAKES
  • Using CREATE TABLE instead of CREATE VIEW
  • Incorrect keyword order like MAKE VIEW
  • Swapping VIEW and CREATE keywords

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes