DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: How to give priv's on a columns ?

  1. #1
    Join Date
    Nov 2000
    Posts
    79
    Hi,

    I want the user to select the address and phone number based on social security number in the where clause, but not to find the social security number by giving phone number in the where clause.

    e.g

    select address, phone from test
    where ssn='123456789' ;

    not


    select ssn from test
    where phone='123-345-1234';


    Any solutions ?.


    Thanks in advance.


    gtm

  2. #2
    Join Date
    Jan 2001
    Posts
    3,134
    Can you create a view?

    MH
    I remember when this place was cool.

  3. #3
    Join Date
    Nov 2000
    Posts
    79
    Hi, if I create a view without ssn, then I can not use the ssn in the predicate. Any suggestions ?

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Hmmm. Almost sounds like you will need to create a refcursor and hide the logic behind it.
    Jeff Hunter

  5. #5
    Join Date
    Nov 2000
    Posts
    79
    Actually, this query would run from a web page.



    Gtm

  6. #6
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Originally posted by marist89
    Hmmm. Almost sounds like you will need to create a refcursor and hide the logic behind it.
    Jeff Hunter

  7. #7
    Join Date
    Nov 2000
    Posts
    79
    Thank you Jeff, would you please provide an example to the solutions ?.



    Thanks-

  8. #8
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Does the table have user's login id ?

  9. #9
    Join Date
    May 2002
    Posts
    2,645
    Create a procedure - input the SSN, and out comes the name and phone number.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width