thieumao

Khoa ngoai

Mar 6th, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.45 KB | None | 0 0
  1. 1. CatTable
  2. idCat
  3. CatName
  4.  
  5. 2. StoryTable
  6. idCat
  7. idStory
  8. StoryName
  9.  
  10. 3. PageTable
  11. idStory
  12. idPage
  13. PageDetail
  14.  
  15. ____________
  16.  
  17. ALTER TABLE  `storytable` ADD FOREIGN KEY (  `idCat` ) REFERENCES  `topkute`.`cattable` (
  18. `idCat`
  19. ) ON DELETE RESTRICT ON UPDATE RESTRICT ;
  20.  
  21. ______________________
  22.  
  23.  
  24. ALTER TABLE  `pagetable` ADD FOREIGN KEY (  `idStory` ) REFERENCES  `topkute`.`storytable` (
  25. `idStory`
  26. ) ON DELETE RESTRICT ON UPDATE RESTRICT ;
Advertisement
Add Comment
Please, Sign In to add comment