Thursday, June 2, 2011

How to rename columns using views?

Create a view which is a subset of the employee table as follows.
Renaming columns in views will help increase security of sensitive tables  and hiding columns under alias names

Replace  view EmployeeV( number,fullname,addr,phno,depnum,sal, expr) as
locking row for access 
sel
EmpNo ,                       
Name  ,                       
Address,                      
Phone   ,                     
DeptNo   ,                    
Salary    ,                   
YrsExp                      
from employee;


When we run sel * form employeeV, Only alias columns are displayed .

No comments:

Post a Comment