Restrict update Column

Posted by Kushan Hasithe Fernando on Stack Overflow See other posts from Stack Overflow or by Kushan Hasithe Fernando
Published on 2011-01-02T04:20:09Z Indexed on 2011/01/02 5:53 UTC
Read the original article Hit count: 212

Filed under:
|

Is it possible to restrict updating a column in SQL without using a trigger ? If so how ? (need the query)


PS:

I mean, I have a table

CREATE TABLE MYBUDGET.tbl_Income
(
    [IncomeID]          INT             NOT NULL IDENTITY(1,1),
    [IncomeCatID]       INT             NOT NULL,
    [IncomeAmnt]        MONEY           NOT NULL,
    [IncomeCurrencyID]  INT             NOT NULL,
    [ExchangeRateID]    INT             NOT NULL,
    [IncomeAmnt_LKR]    MONEY           NOT NULL,
    [AddedOn]           DATETIME        NOT NULL,
    [Remark]            VARCHAR(250),
)

I need to allow users to update only [ExchangeRateID] and [IncomeAmnt_LKR] fields. All other fields can not be updated. only insert.

© Stack Overflow or respective owner

Related posts about sql

Related posts about sql-server