Witam,
mam takie tabele w ms sql server:
create table Student (
ID_Student int not null primary key,
Imie varchar(20) not null,
Nazwisko varchar(50) not null)
create table Praca_dyplomowa (
ID_Praca_dyplomowa int not null primary key,
Temat varchar(max) not null)
create table Autor (
ID_Student int not null foreign key references Student(ID_Student),
ID_Praca_dyplomowa int not null foreign key references Praca_dyplomowa(ID_Praca_dyplomowa),
CONSTRAINT pk_Autor PRIMARY KEY (ID_Student, ID_Praca_dyplomowa))
Potrzebuję stworzyć TRIGGER nie pozwalający wprowadzić więcej niż 3 Autorów jednej pracy dyplomowej (jeden temat może opracowywać max 3 Studentów) lecz nie bardzo wiem jak to zrobić,
Proszę o wskazówki
Pozdrawiam