how can i lock the column in the table

Answers were Sorted based on User's Feedback



how can i lock the column in the table..

Answer / 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

how can i lock the column in the table..

Answer / prasad237

create trigger trigger_name1
on emp
for update
as
begin
if update(ename)
begin
begin tran
raiserror('cannot update column name',16,1)
rollback tran
end
else
print 'table updated'

end

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is the difference between writing data to mirrored drives versus raid5 drives

0 Answers  


What is the primary use of the model database?

0 Answers  


Does dbcc checkdb requires db to be in single_user mode? : sql server database administration

0 Answers  


Difference between connected and disconnected database in .net with sql server?

0 Answers   Infosys,


What is the difference between Stored Procedure , Function and Package, 1. how many blocks in Package and what are they.

5 Answers   IBM,






Explain the microsoft sql server delete command? : SQL Server Architecture

0 Answers  


How to change the name of a database user?

0 Answers  


What is the default server name for sql server?

0 Answers  


How to declare a cursor with "declare ... Cursor" in ms sql server?

0 Answers  


What are different types of statements that are supported by sql?

0 Answers  


Do you know what is rank function?

0 Answers  


How will you make an attribute not process? : sql server analysis services, ssas

0 Answers  


Categories