Friday 25 May 2018

Invisible Column from Oracle 12c



CREATE TABLE cust_details (
    cust_id               NUMBER,
    cust_name             VARCHAR2(100),
    cust_address          VARCHAR2(255),
    cust_account_number   NUMBER INVISIBLE
);

desc cust_details;

SET COLINVISIBLE ON

desc cust_details;

insert into cust_details values(1,'SCOTT','500,1A,california');
insert into cust_details(cust_id,cust_name,cust_address,cust_account_number) 
                         values(2,'JAMES','101,1A,Atlantic,08201',1234123412341234);
                         
SELECT
    *
FROM
    cust_details;

SELECT
    cust_id,
    cust_name,
    cust_address,
    cust_account_number
FROM
    cust_details;
    
update cust_details set cust_account_number = -9999
where cust_account_number is null;

alter table cust_details modify cust_account_number visible;

desc cust_details;

alter table cust_details modify cust_account_number invisible;

desc cust_details;

SELECT
    column_id,
    column_name,
    hidden_column
FROM
    user_tab_cols
WHERE
    table_name = 'CUST_DETAILS'
ORDER BY
    column_id;

3 comments:

  1. Very useful bro..Thanks a lot...

    ReplyDelete
  2. I like ur way of teaching.... Very nice to see ur vedios

    ReplyDelete
  3. Iam so thrilled because of finding your alluring website here.Actually i was searching for Oracle PPM Cloud.Your blog is so astounding and informative too..Iam very happy to find such a creative blog. Iam also find another one by mistake while am searching the same topicOracle Fusion HCM.Thank you soo much.

    ReplyDelete

About Me

I am Siva Jeevan.LK [LEARN | CODE | TRAIN | SHARE] Passionate to answer oracle SQL & PLSQL related questions. In my day to day job, I work with technologies including Oracle, Java, Python, MongoDB, talend and UNIX. I am passionate about "DATA", “SQL” , coding & training. In my spare time, I teach database technologies , ETL etc. I am very glad that you are reading my Profile, and I value your time as well as mine. Looking forward to see you in my videos at Siva Academy Passionate to answer oracle SQL & PLSQL related questions. You can contact me via My youtube channel (Siva Academy) or drop an email at siva.k.academy@gmail.com Happy to Learn & Help :-)

Total Pageviews