Updating primary key


29-Nov-2017 13:29

Associated values in child table would be set to default value specified in column definition.

updating primary key-30

100 spiritual dating 100

updating primary key-67

Cams bang

updating primary key-37

who jennifer love hewitt dating

The following script adds "ON DELETE CASCADE ON UPDATE CASCADE" -- Script 5: Create FK relationship with CASCADE-- Create FK relationship IF EXISTS (SELECT * FROM sys.objects WHERE name = N'FK_Emp Education_Employees' AND [type] = 'F')ALTER TABLE Emp Education DROP Constraint FK_Emp Education_Employees GOALTER TABLE Emp Education ADD CONSTRAINT [FK_Emp Education_Employees]FOREIGN KEY (empno)REFERENCES employees(empno)ON DELETE CASCADE ON UPDATE CASCADE GO -- Script 6: Create FK relationship with SET NULL-- Create FK relationship IF EXISTS (SELECT * FROM sys.objects WHERE name = N'FK_Emp Education_Employees' AND [type] = 'F')ALTER TABLE Emp Education DROP Constraint FK_Emp Education_Employees GOALTER TABLE Emp Education ADD CONSTRAINT [FK_Emp Education_Employees]FOREIGN KEY (empno)REFERENCES employees(empno)ON DELETE SET NULL ON UPDATE SET NULLGO For utilizing the SET DEFAULT rule for update/delete operations default value should be there for foreign key column.

Let's create the foreign key with the default specification through T-SQL.