Home » RDBMS Server » Server Administration » hide a column
hide a column [message #373107] Tue, 27 March 2001 16:37 Go to next message
CHACKO
Messages: 11
Registered: March 2001
Junior Member
How can be eliminate /Hide a column in sql?
Re: hide a column [message #373113 is a reply to message #373107] Wed, 28 March 2001 05:45 Go to previous messageGo to next message
kavithask
Messages: 34
Registered: March 2001
Location: London
Member
Hi,

You can hide a column when you SQL*Plus by using the COLUMN command.

COL <colname> noprint

This will stop it from printing on the screen or to the spool file.

HTH
Kavitha
Re: hide a column [message #373115 is a reply to message #373107] Wed, 28 March 2001 06:05 Go to previous messageGo to next message
John R
Messages: 156
Registered: March 2000
Senior Member
Create a view on the table which only selects the columns you want the users to see.
Revoke all rights to the underlying table from the users and grant them select on the view.
Re: hide a column [message #373120 is a reply to message #373107] Wed, 28 March 2001 09:18 Go to previous messageGo to next message
Jaco
Messages: 23
Registered: August 2000
Junior Member
Hi,

I gave that command but it is not working

select k.*,col sal noprint from emp k;
Is this is right?
can you send this command please..I don't want sal column print but i need the remaing all columns. thanks
Re: hide a column [message #373123 is a reply to message #373120] Wed, 28 March 2001 11:38 Go to previous messageGo to next message
Balamurugan.R
Messages: 91
Registered: March 2001
Member
Hi,

Before giving the query do this

sql>column sal noprint

and then give the query
sql> select * from emp;

It won't print the sal column
Re: hide a column [message #373127 is a reply to message #373107] Wed, 28 March 2001 14:16 Go to previous messageGo to next message
CHACKO
Messages: 11
Registered: March 2001
Junior Member
I GOT IT

SQL> COLUMN SAL NOPRINT
SQL> SELECT * FROM EMP;
THEN IT WORKS

JACO
Re: hide a column [message #373128 is a reply to message #373127] Wed, 28 March 2001 14:42 Go to previous message
Vishal
Messages: 86
Registered: August 2000
Member
Hey I tried it .

Looks like toad is not recognizing the first line

Vishal
Previous Topic: How do I store a timestamp to a date datatype in a table?
Next Topic: Re: Trademark symbol
Goto Forum:
  


Current Time: Mon Dec 23 06:17:23 CST 2024