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

Solve for k k-10/2= -7
What effects does the jungle have on the boys? (Lord of the Flies) a. the jungle is where they come together and feel less isolated b. the jungle is where they
What is the part of speech of the underlined word in the sentence? The mall is here. A. preposition B. adjective C. verb D. adverb is underlind a?
what is the absolute value of 9.8
Donna purchased 3 bags of dog food. The total cost of her purchase, including a tax of $3.96, is $53.46.What is the cost of 1 bag of dog food? A. $3.96 B. $13.8
how many times does 8 go in 400
what is the unit rate for 4/8
Canada sent two groups of armed forces into combat in World War One. One was the Canadian Corps. What was the other group called
Few Questions! NEED HELP PLEASE , CONFUSED!! 1. Cards numbered 1 through 30 are shuffled in a bin. One card is randomly selected. What is the probability of sel
A substance that yields an anion plus a hydrogen ion is a(n) _____.