how can i lock the column in the table

Answer Posted / arunkumar2visit

create trigger trigger_name
on tablename
for update
as
if update(col_name)
begin
raiseerror('cannot update column name',16,1)
rollback trac
end

Is This Answer Correct ?    29 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I check if a view exists in a sql server database?

568


Is profiler the only tool that has the ability to audit and identify ddl events? : sql server security

584


Explain about Joins?

612


What is the difference between varchar and nvarchar datatypes?

574


Tell me what are cursors and when they are useful?

511






How do I get to sql server configuration manager?

524


What is cdc in sql server?

574


Can we use where clause with group by?

522


How to transfer data from a cursor to variables with a "fetch" statement?

588


What happens when converting big values to integers?

572


How to add the custom code in Report?

99


Explain concepts of analysis services?

516


What does it mean to invest in the index?

515


What is update_statistics command?

577


What is the difference between clustered and non-clustered indexes in ms sql server?

496