Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: One way column in a view
Randy Harris wrote:
> Anyone know of a way that I can create a view that would prevent viewing a
> certain column but still permit that column to be used in the where clause?
> I need for users to be able to look up data by the credit card number, but
> not be able to get a list of credit card numbers.
>
> The database is currently 8.1.7.
No. The closest you might get is something like this:
CREATE OR REPLACE VIEW v AS
SELECT '****-****-****-' || SUBSTR(ccard,16)
FROM t;
Where the table holds the entire credit card number but the view only shows the last four digits.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Thu Apr 14 2005 - 20:21:33 CDT
![]() |
![]() |