Invisible column concepts has been introduced in Oracle 12c. We can use this feature to hide the column from other users. Before 12c, we use to hide in a query called view and provide it to the other users.
This column even cannot be seen by other users using query like "select * ". columns cannot be use until and unless you specifically provide the name of the column.
We can do this by following way:-
CREATE TABLE EMPLOYEE (EMP_NO NUMBER,EMP_NAME VARCHAR2(50), EMP_DEPT NUMBER,EMP_SALARY NUMBER INVISIBLE);
Now if you want to insert data in EMPLOYEE table, you should specifically mention invisible column name to insert the data like :-
INSERT INTO EMPLOYEE (EMP_NO,EMP_NAME,EMP_DEPT,EMP_SALARY)
VALUES (1,'CHANCHAL','10,10000);
If you try to insert data live typical insert statement, it won't allow.
Read Also:-
No comments:
Post a Comment