View to hide sensitive columns

View to hide sensitive columns

Medium SQL Views 16 views
Explanation Complexity

Problem Statement

Payroll(emp_id, salary, bank_account). Create view exposing emp_id and salary only.

Input Format

SQL DDL

Output Format

View created

Example

Payroll
View created

Constraints

Do not expose bank_account

Input / Output Format

Input Format
SQL DDL
Output Format
View created
Constraints
Do not expose bank_account

Examples

Input:
Payroll
Output:
View created

Example Solution (Public)

SQL
CREATE VIEW v_payroll_public AS SELECT emp_id, salary FROM Payroll;

Official Solution Code

CREATE VIEW v_payroll_public AS SELECT emp_id, salary FROM Payroll;
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.