Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Invisible field

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

In Oracle 11g R1, Oracle introduced some nice enhancements in the form of invisible indexes and virtual fields. Inheriting the former and carrying forward, the idea of invisible fields is introduced in Oracle 12c R1. In previous versions, in order to hide important data fields to avoid displaying in generic queries, we used to create a view to hide the required information or apply certain security conditions. In 12c R1, you can create invisible fields in the table. When a field is defined as invisible, it does not appear in a generic query unless the field is explicitly mentioned in the SQL statement or condition, or there is a DESCRIBED in the table definition. It is very easy to add or modify an invisible field, and vice versa.

SQL > create table invisible_t (id int,name varchar2 (20) passwd varchar2 (20) invisible)

Table created.

SQL > insert into invisible_t values (1)

Insert into invisible_t values (1)

*

ERROR at line 1:

ORA-00913: too many values

SQL > insert into invisible_t (id,name,passwd) values (1)

1 row created.

SQL > alter table invisible_t modify (passwd invisible)

Table altered.

SQL > desc invisible_t

Name Null? Type

ID NUMBER (38)

NAME VARCHAR2 (20)

SQL > SET COLINVISIBLE ON

SQL > desc invisible_t

Name Null? Type

ID NUMBER (38)

NAME VARCHAR2 (20)

PASSWD (INVISIBLE) VARCHAR2 (20)

SQL > SET COLINVISIBLE Off

SQL > desc invisible_t

Name Null? Type

ID NUMBER (38)

NAME VARCHAR2 (20)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report