-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.1.14-beta-community-nt /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -- -- Create schema db1 -- CREATE DATABASE IF NOT EXISTS db1; USE db1; -- -- Definition of table `table-1` -- DROP TABLE IF EXISTS `table-1`; CREATE TABLE `table-1` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `idtype` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `FK_table1_1` (`idtype`), CONSTRAINT `FK_table1_1` FOREIGN KEY (`idtype`) REFERENCES `table-2` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `table-1` -- /*!40000 ALTER TABLE `table-1` DISABLE KEYS */; INSERT INTO `table-1` (`id`,`idtype`) VALUES (1,1); /*!40000 ALTER TABLE `table-1` ENABLE KEYS */; -- -- Definition of table `table-2` -- DROP TABLE IF EXISTS `table-2`; CREATE TABLE `table-2` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `description` varchar(45) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `table-2` -- /*!40000 ALTER TABLE `table-2` DISABLE KEYS */; INSERT INTO `table-2` (`id`,`description`) VALUES (1,'Fenine'), (2,'Sea creature'); /*!40000 ALTER TABLE `table-2` ENABLE KEYS */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;