Bird
0
0

Identify the error in this view creation statement:

medium📝 Debug Q14 of 15
SQL - Views
Identify the error in this view creation statement:
CREATE VIEW SalesView SELECT * FROM Sales;
ASELECT * is not allowed in views
BView name cannot be SalesView
CMissing AS keyword before SELECT
DCREATE VIEW must include WHERE clause
Step-by-Step Solution
Solution:
  1. Step 1: Check the syntax of CREATE VIEW

    The correct syntax requires AS before the SELECT statement.
  2. Step 2: Identify the missing keyword

    The statement misses AS, causing a syntax error.
  3. Final Answer:

    Missing AS keyword before SELECT -> Option C
  4. Quick Check:

    CREATE VIEW ... AS SELECT ... [OK]
Quick Trick: Always include AS before SELECT in CREATE VIEW [OK]
Common Mistakes:
MISTAKES
  • Omitting AS keyword
  • Misplacing SELECT clause
  • Assuming WHERE clause is mandatory

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes