title: I am not able to create foreign key in mysql Error 150. Please help
body: <p>i am trying to create a foreign key in my table. But when i executes my query it shows me error 150.</p>
  
  <pre><code>Error Code : 1025
  Error on create foreign key of '.\vts\#sql-6ec_1' to '.\vts\tblguardian' (errno: 150)
  (0 ms taken)
  </code></pre>
  
  <p>My Queries are </p>
  
  <p>Query to create a foreign Key</p>
  
  <pre><code>alter table `vts`.`tblguardian` add constraint `FK_tblguardian` FOREIGN KEY (`GuardianPickPointId`) REFERENCES `tblpickpoint` (`PickPointId`)
  </code></pre>
  
  <p>Primary Key table</p>
  
  <pre><code>CREATE TABLE `tblpickpoint` (                                                           
                  `PickPointId` int(4) NOT NULL auto_increment,                                         
                  `PickPointName` varchar(500) default NULL,                                            
                  `PickPointLabel` varchar(500) default NULL,                                           
                  `PickPointLatLong` varchar(100) NOT NULL,                                             
                  PRIMARY KEY  (`PickPointId`)                                                          
                ) ENGINE=InnoDB DEFAULT CHARSET=latin1 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=DYNAMIC  
  </code></pre>
  
  <p>Foreign Key Table</p>
  
  <pre><code>CREATE TABLE `tblguardian` (                           
                 `GuardianId` int(4) NOT NULL auto_increment,         
                 `GuardianName` varchar(500) default NULL,            
                 `GuardianAddress` varchar(500) default NULL,         
                 `GuardianMobilePrimary` varchar(15) NOT NULL,        
                 `GuardianMobileSecondary` varchar(15) default NULL,  
                 `GuardianPickPointId` int(4) default NULL,     
                 PRIMARY KEY  (`GuardianId`)                          
               ) ENGINE=InnoDB DEFAULT CHARSET=latin1    
  </code></pre>