Advertisement
Guest User

Untitled

a guest
Nov 5th, 2015
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 1.38 KB | None | 0 0
  1. -- phpMyAdmin SQL Dump
  2. -- version 4.0.10deb1
  3. -- http://www.phpmyadmin.net
  4. --
  5. -- Host: localhost
  6. -- Generation Time: Nov 05, 2015 at 06:53 PM
  7. -- Server version: 5.6.27-0ubuntu0.14.04.1
  8. -- PHP Version: 5.5.9-1ubuntu4.14
  9.  
  10. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  11. SET time_zone = "+00:00";
  12.  
  13.  
  14. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  15. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  16. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  17. /*!40101 SET NAMES utf8 */;
  18.  
  19. --
  20. -- Database: `test`
  21. --
  22.  
  23. -- --------------------------------------------------------
  24.  
  25. --
  26. -- Table structure for table `table2`
  27. --
  28.  
  29. CREATE TABLE IF NOT EXISTS `table2` (
  30.   `id` int(11) NOT NULL AUTO_INCREMENT,
  31.   `fk` int(11) NOT NULL,
  32.   PRIMARY KEY (`id`),
  33.   KEY `fk` (`fk`)
  34. ) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
  35.  
  36. --
  37. -- Dumping data for table `table2`
  38. --
  39.  
  40. INSERT INTO `table2` (`id`, `fk`) VALUES
  41. (1, 1);
  42.  
  43. --
  44. -- Constraints for dumped tables
  45. --
  46.  
  47. --
  48. -- Constraints for table `table2`
  49. --
  50. ALTER TABLE `table2`
  51.   ADD CONSTRAINT `table2_ibfk_1` FOREIGN KEY (`fk`) REFERENCES `table1` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE;
  52.  
  53. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  54. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  55. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement