Jacob Uden

Write 3 update and delete statements

Excerpt from the complete ddl: http://sqlfiddle.com/#!9/2047e0

  • October 6, 2016 at 3:52 PM
  • Visible to public
UPDATE `pets` SET `name`='Bigby' WHERE `name`='BigBertha';
UPDATE `pets` SET `sex`='m' WHERE `name`='Bigby';
UPDATE `pets` SET `sex`='f' WHERE `name`='Screech';
UPDATE `pets` SET `sex`='m' WHERE `name`='Mini';
UPDATE `pets` SET `name`='Mickey' WHERE `name`='Mini';
UPDATE `food` SET `quantity`='2' WHERE `name`='catChow';
DELETE FROM `species` WHERE `name`='barnMouse';
DELETE FROM `species` WHERE `name`='shedMouse';
DELETE FROM `food` WHERE `name`='whoKnows';

It was difficult to determine sexes of the cats when they were kittens, hence the updates.
The mice are presumably gone, hence the deletion.