var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Insert Trigger How to work
I have a table which has fields |person_id| AND |fullname|
I would like to create and insert trigger so that no duplicate names shoudl be inserted, I tryed Following but am geeting confused Where I am going Wrong
I need to take an Input from user to this trigger as well how is it possiible??
create trigger ins_per
for insert as
Declare @p_name varchar(45)
select * from persons where full_name=@p_name
A unique constraint does the trick!
Alter table x add constraint constraint_name unique nonclustered (Column 1,Column 2)
The combination column1 + column2 must be unique.
Hope it helps!