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

Which are text features that a reader can use to preview a text? Check all that apply. A. captions B, headings C. images D. purposes E, titles
Imagine you are Sancho Panza. Write a postcard about your adventures with Don Quixote. Just from reading this excerpt, what could you say about him? Do you find
What does "attachable" mean in these sentences?
lura keeps records of the distance she travels in an uberand what it costs. what will the fare be for 5 miles and 6?​
what is an opposite in math?
When Jeanne's family moved from Manzanar back to Long Beach, why did they have trouble finding a home?A) The government told them they were only allowed to stay
help would be appreciated.
the girl thinks that t he world is
How is the passage organized?
The longer leg of a right triangle is 3 inches more than three times the length of a shorter leg the area of the triangle is 84 in.² what is the perimeter of th