Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7792797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:17:47+00:00 2026-06-01T22:17:47+00:00

I have a table with a column that I want to prevent certain users

  • 0

I have a table with a column that I want to prevent certain users from seeing. I understand that I should be able to do this using a view, i.e. have a view which excludes the particular column, and deny access to the table but allow access to the view (note, users do not need to be able to update the table/view).

I do however want to allow an equality query against the field. Such as:

SELECT * FROM some_table_or_view WHERE hidden_field = 'some_value';

To clarify:

  • it should not be possible to have the hidden_field values be returned in a general query
  • it should be possible to run a query with a constraint (preferably only an equality constraint) on the hidden_field value

Is this possible?

(EDIT: if there’s a solution in a dbms other than Mysql, I’d be happy to hear about that, too).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T22:17:49+00:00Added an answer on June 1, 2026 at 10:17 pm

    You can create a stored procedure which would return all the fields you allowed it to return, and then you can pass the hidden_value (filtering criterion) as a parameter.

    Forbid your database users accessing the table, but allow them to call stored procedures.

    Then of course, you would have to create several stored procedures if you had several types of queries against the table. But at least it solves your problem with the rights.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table column that needs to be limited to a certain width
I have a table with a SortID column that is numbered using consecutive numbers.
I have 2 tables with some columns and another table that I want its
I have the following requirement. I have a table with a column that contains
I have a table that has a column that has the cost of a
I have mysql table that has a column that stores xml as a string.
I have a table with an identity column that have incremented by 1 for
Lets suppose that I have a Category table with a column that holds the
I currently have a table with an id column that is being autoincremented and
Currently I have a User table that has a toys_owned column that is an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.