Database Administration (MOSC)

MOSC Banner

How to create a table with hidden/profiled columns

edited Nov 27, 2012 9:17PM in Database Administration (MOSC) 3 commentsAnswered
I want to create a table, some of the columns shouldn't be included in a SELECT * statement. Follows an example:

SQL> create table temp
2 (
3 c1 number,
4 c2 number,
5 c3 number
6 );

Table created.


SQL> insert into temp values (1,2,3);

1 row created.


SQL> select * from temp;

C1 C2 C3
---------- ---------- ----------
1 2 

I want C3 to be a "hidden" column and while selecting like 

select * from temp;
expected output is...

C1 C2
---------- ----------
1 2 

My main target is, C3 column should not display in SELECT * statement, but column with data should be there in table. The best would be profiling the inclusion of C3 in the SELECT * stm depending on grants owned by the user.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center