Bird
0
0

Which of the following is the correct syntax to create a view named employee_view showing all columns from employees table?

easy📝 Syntax Q12 of 15
SQL - Views
Which of the following is the correct syntax to create a view named employee_view showing all columns from employees table?
ACREATE employee_view VIEW AS SELECT * FROM employees;
BCREATE VIEW employee_view FROM employees;
CVIEW CREATE employee_view AS SELECT * FROM employees;
DCREATE VIEW employee_view AS SELECT * FROM employees;
Step-by-Step Solution
Solution:
  1. Step 1: Recall the standard syntax for creating a view

    The correct syntax is: CREATE VIEW view_name AS SELECT ...
  2. Step 2: Match the syntax with options

    CREATE VIEW employee_view AS SELECT * FROM employees; matches the correct syntax exactly.
  3. Final Answer:

    CREATE VIEW employee_view AS SELECT * FROM employees; -> Option D
  4. Quick Check:

    CREATE VIEW ... AS SELECT ... [OK]
Quick Trick: Use 'CREATE VIEW view_name AS SELECT ...' format [OK]
Common Mistakes:
MISTAKES
  • Swapping keywords CREATE and VIEW
  • Using FROM instead of AS
  • Incorrect keyword order

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes