Bird
0
0

You tried to create a view with:

medium📝 Debug Q14 of 15
SQL - Views
You tried to create a view with:
CREATE VIEW MyView AS SELECT id, password FROM Users;
But you want to hide the password column for security. What is the best fix?
ARemove <code>password</code> from the SELECT list in the view
BRename the view to hide the password
CAdd WHERE password IS NOT NULL clause
DUse DELETE to remove password column from Users table
Step-by-Step Solution
Solution:
  1. Step 1: Identify the problem with the view

    The view currently shows the password column, which exposes sensitive data.
  2. Step 2: Fix the view to hide sensitive data

    Removing the password column from the SELECT statement prevents it from appearing in the view.
  3. Final Answer:

    Remove password from the SELECT list in the view -> Option A
  4. Quick Check:

    Exclude sensitive columns from view SELECT = D [OK]
Quick Trick: Exclude sensitive columns in view SELECT to hide them [OK]
Common Mistakes:
MISTAKES
  • Trying to rename view to hide data
  • Using WHERE clause to filter columns
  • Deleting columns from base table instead of view

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes