Answers for "CREATE MULTIPLE FK"

SQL
0

CREATE MULTIPLE FK

/* RENAME FK's FOR BETTER :) */
/* Name it fk_food */

  CONSTRAINT `fk_food`
    FOREIGN KEY (`food` )
    REFERENCES `mydb`.`food` (`id` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  /* Name it fk_restaurant */
  
  CONSTRAINT `fk_restaurant`
    FOREIGN KEY (`restaurant` )
    REFERENCES `mydb`.`restaurants` (`id` )
    ON DELETE NO ACTION
    ON UPDATE NO ACTION
    
    );
Posted by: Guest on October-11-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language