Skip to content

Tag: triggers

What’s wrong with this PL/SQL Trigger?

I have this table, and I want to create a trigger on Magazine, that verifies “after insert” if the name of the Magazine inserted is either Vogue or People. If it’s not one of them, it gets deleted. Table: MAGAZINE (ISBN, MAG_NOM, PRIX_Mois); My trigger: But the problem is my teacher told me:…

Validation trigger not working in SQL Server

I am working on a trigger for a class project. I have a table named salesman with a column named type. All employees in the table currently have a type of full, part or temp. The purpose of the trigger is to check a newly inserted row’s type and make sure that it matches one of the three that already

Limit number of occurrences of value in a table oracle sql

I have oracle sql table of students, students are assigned to groups. I have to set constraint so there will be no more than 10 students in a group (ideally no more than N students in a group). Basically restrict table from having more than N rows with the same GROUP_ID value. Here is table declaration. I&#82…