kasenwilliams6187 kasenwilliams6187
  • 09-10-2017
  • Business
contestada

When inserting a new printer, check that the model number exists in product?

Respuesta :

ahmedishaal ahmedishaal
  • 21-10-2017

We write this trigger  in Oracle SQL in a following way;

CREATE TRIGGER NewPrinterTrigger 

AFTER INSERT ON Printer 

REFERENCING 

  NEW ROW AS NewRow, 

  NEW TABLE AS NewStuff 

FOR EACH ROW 

WHEN (NOT EXISTS (SELECT * FROM Product  

       WHERE Product.model = NewRow.model)) 

DELETE FROM Printer 

  WHERE (model, color, type, price) IN NewStuff; 

Answer Link

Otras preguntas

By 1950, only 8 reindeer remained on the island. What was the average annual decrease between 1938 and 1950?
Why doesnt plants and bacteria expand when it reaches water
Why is population concentrated, or denser, in some areas and not in others?
please help i dont get it
help meeeeee plzzzzzzzzzzz
what was the purpose for the founding of Georgia
Show work plz A beach towel cost $15 before sales tax .If the final cost of the towel is $16.20,what percent of sales tax was charged?
Please help asap 35 pts
"Law of the blood" refers to a rule that a child's citizenship depends on the parents' citizenship location of birth resident alien naturalization
Evaluate the expression. 7 + (- 12)