Re: Column level security
From: Kalen Delaney (kalen_please_reply_on_public_newsgroups_delaney@compuserve.com)
Date: 12/10/02
- Next message: Mike: "Re: Error 21776: after transferring databases"
- Previous message: Fernando Taniguti: "Re: SQL Security Checklist"
- In reply to: Arzan: "Column level security"
- Next in thread: Arzan: "Re: Column level security"
- Reply: Arzan: "Re: Column level security"
- Reply: Arzan: "Re: Column level security"
- Reply: Cindy Gross: "Re: Column level security"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Kalen Delaney" <kalen_please_reply_on_public_newsgroups_delaney@compuserve.com> Date: Tue, 10 Dec 2002 07:40:46 -0800
An INSERT inserts a whole row, which must have a value for every column. So
if a user has insert permission, they can insert into every column. If you
want to make sure that a user only inserts default values for particular
columns, a trigger would work nicely, either an AFTER trigger or an INSTEAD
OF trigger.
Constraints are a good thing. Why don't you want to use them?
You can create a view containing just the columns which the user may supply
values to, and give the user permission to insert into the view. All the
columns which aren't in the view need to have defaults already defined, or
to allow NULLs.
HTH
-- Kalen Delaney SQL Server MVP "Arzan" <aratesh@hotmail.com> wrote in message news:05aa01c2a037$dfd55220$d7f82ecf@TK2MSFTNGXA14... > Hi, > > I would like to know if i can restrict a user from > inserting data into a column. SELECT and UPDATE can be > controlled however i would like to know if i could do it > for INSERTS. I dont want to use triggers or contraints. > > Regards > Arzan
- Next message: Mike: "Re: Error 21776: after transferring databases"
- Previous message: Fernando Taniguti: "Re: SQL Security Checklist"
- In reply to: Arzan: "Column level security"
- Next in thread: Arzan: "Re: Column level security"
- Reply: Arzan: "Re: Column level security"
- Reply: Arzan: "Re: Column level security"
- Reply: Cindy Gross: "Re: Column level security"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|