Skip navigation links

MySQL Forums :: InnoDB :: ERROR 1005: Can't create table (errno: 150)


Advanced Search

Re: ERROR 1005: Can't create table (errno: 150) - Please help
Posted by: Vishwanath Savakar ()
Date: April 15, 2010 07:10AM

I faced this issue and found a solution to it.
If you are trying to alter a table, then take care of NOT NULL and UNSIGNED attributes.

Ex: Consider a table
SALES (name:VARCHAR, quantity:INTEGER)
Assume that you already have 100 elements into this
When you add a new entry into this, say componentid:INTEGER, MySQL gives 1005 error if NOT NULL condition is mentioned. Because existing 100 rows in the table do not have 'componentid' feild and when the field is being added to SALES, the 100 row's value should be set to NULL which is ruled out by NOT NULL condition mentioned in ALTER TABLE and MySQL gives the error saying it cannot create the table.
I removed NOT NULL condition, and it worked for me.



Edited 1 time(s). Last edit at 04/15/2010 07:13AM by Vishwanath Savakar.

Options: ReplyQuote


Subject Views Written By Posted
ERROR 1005: Can't create table (errno: 150) 631017 elmpie 03/24/2005 01:20PM
Re: ERROR 1005: Can't create table (errno: 150) 300863 Martin Lukasiewycz 03/28/2005 02:15PM
Re: ERROR 1005: Can't create table (errno: 150) 213403 KimSeong Loh 03/29/2005 08:42PM
Re: ERROR 1005: Can't create table (errno: 150) 153994 Michael Buell 05/30/2005 10:29AM
Re: ERROR 1005: Can't create table (errno: 150) 148410 Chris Yuan 10/27/2005 11:01PM
Re: ERROR 1005: Can't create table (errno: 150) 91348 Deepak Kumar 03/14/2008 11:45PM
ERROR 1005: Can't create table (errno: 150) 71605 Pradeep Max 07/07/2008 09:00AM
Re: ERROR 1005: Can't create table (errno: 150) 49156 karthik sakthi 03/12/2009 07:38AM
Re: ERROR 1005: Can't create table (errno: 150) Global solution 50119 Mayur P Vegad 06/23/2010 08:13AM
Re: ERROR 1005: Can't create table (errno: 150) Global solution 19904 B S 08/13/2011 09:04PM
unfortunately not 4364 Gavin Stokes 10/09/2012 09:48PM
Re: ERROR 1005: Can't create table (errno: 150) 36757 Agyeya Gupta 04/26/2009 06:23AM
Re: ERROR 1005: Can't create table (errno: 150) 25106 Chris Walker 06/28/2009 12:40PM
Re: ERROR 1005: Can't create table (errno: 150) [SOLVED] 47742 Chris Walker 06/28/2009 12:41PM
Re: ERROR 1005: Can't create table (errno: 150) [SOLVED] 28583 Jitendra Gupta 09/04/2009 02:30AM
Re: ERROR 1005: Can't create table (errno: 150) [ANOTHER SOLUTION] 28707 Jim Smith 01/11/2010 10:23AM
Re: ERROR 1005: Can't create table (errno: 150) [ANOTHER SOLUTION] 10576 Esen Sagynov 04/17/2011 05:39AM
Re: ERROR 1005: Can't create table (errno: 150) [SOLVED] 12142 noor afies prasetyo 11/03/2010 10:10PM
Re: ERROR 1005: Can't create table (errno: 150) [SOLVED] 1809 marius m 12/17/2012 07:52AM
Re: ERROR 1005: Can't create table (errno: 150) [SOLUTION] 17286 Stefan Catalin 01/29/2010 05:15AM
Re: ERROR 1005: Can't create table (errno: 150) [SOLUTION] 12739 Mahesh Raju 05/11/2010 03:36AM
Re: ERROR 1005: Can't create table (errno: 150) 7176 Petrica Martinescu 04/09/2010 02:05AM
Re: ERROR 1005: Can't create table (errno: 150) 2944 Prasad Kothe 12/19/2011 01:49AM
Do not reply to this thread! 2796 Rick James 12/19/2011 10:13PM
Re: ERROR 1005: Can't create table (errno: 150) 3119 Jayesh Tejwani 08/12/2011 12:19PM
Re: ERROR 1005: Can't create table (errno: 150) 4486 Dan Beavon 10/20/2010 03:59AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 42730 chaotical_impulse 06/09/2005 04:01AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 44742 chaotical_impulse 06/09/2005 04:22AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 35659 Vishal Mody 07/20/2005 03:02PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 152484 Maria Modeste 08/03/2005 08:08PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 26953 KimSeong Loh 08/04/2005 02:57AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 29754 Maria Modeste 08/06/2005 08:38PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 24688 KimSeong Loh 08/06/2005 11:07PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 22486 KimSeong Loh 08/07/2005 06:52PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 18955 jacob wood 08/09/2005 09:43AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 19873 Maria Modeste 08/10/2005 06:23PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 3166 Dave Kelly 12/30/2010 06:06AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 4236 Mahder Gebremedhin 01/01/2011 04:45PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 2917 Mile Stojanov 01/08/2011 01:56PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 2728 Mile Stojanov 01/08/2011 01:59PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 14607 mySQL newbie 11/30/2005 01:11AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 10503 Halil Özgür 06/24/2008 02:43PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 7785 Todd S 02/03/2009 02:26PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 9097 Pradeep Max 07/07/2008 07:37AM
ERROR 1005: Can't create table (errno: 150) :: InnoDB 16067 Thomas Rasoarahona 07/10/2008 08:29AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 3750 marat beiner 05/11/2010 06:02AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 6409 Bill Monk 05/19/2009 02:43PM
Solution to Bill Monk's problem creating table structures. 7165 Mohamed Infiyaz Zaffer Khalid 05/19/2009 10:17PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 5337 David Chell 07/19/2009 11:28PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 5378 Mohamed Infiyaz Zaffer Khalid 07/20/2009 06:34AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 37467 Maria Modeste 08/07/2005 10:06AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 27942 Edwin Dando 09/10/2005 04:31PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 9799 KimSeong Loh 09/11/2005 04:40AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 14728 max ac 04/20/2007 04:54AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 9628 KimSeong Loh 04/29/2007 10:05PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 8752 Brian Couchman 10/20/2005 09:52AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 7935 Sean Jones 10/30/2005 10:51PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 7726 Sean Jones 10/30/2005 10:52PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 45971 iker landajuela 11/10/2005 04:24AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 9084 dammika priyakumara 11/14/2006 05:42AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 1183 Abdul Ismail 09/17/2012 03:27AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 8311 Anadi Misra 08/08/2007 07:06AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 8310 James Day 08/08/2007 05:24PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 7837 Sean Jones 10/30/2005 10:37PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 7402 sheryl tesoro 12/19/2005 05:24AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 7519 Felix Geerinckx 12/19/2005 06:19AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 7630 Jim Campbell 02/08/2008 10:19PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 8466 Jim Campbell 02/08/2008 10:34PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 4416 Gary machol 04/21/2010 04:55AM
my script 8224 dan bilauca 05/09/2006 06:01PM
Re: my script 7433 kevin martin 11/15/2006 02:05PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 2751 Guillermo Gutiérrez 10/23/2010 05:23PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 5855 Steve Cavanagh 12/02/2008 09:05PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 4945 Marc Binder 05/08/2009 01:56AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 1817 andrea manconi 10/11/2011 02:30AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 5732 Jaco Imthorn 11/24/2008 07:20AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 7979 Kola Yusuf 01/05/2009 04:58AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 1827 ken wang 08/11/2011 02:04AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 1450 Chris Moreland 02/15/2012 02:10PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 1322 Bellfalasch - 05/07/2012 08:08AM
DO NOT add to this thread! Start a new one! 1336 Rick James 05/08/2012 09:19AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 2872 Aniruddha Manakeshwar 02/21/2012 11:05AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 7860 Maxim Shumov 10/23/2007 02:34PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 6717 Ian Channing 12/07/2007 11:41AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 6326 Suman Kirti 04/21/2008 03:38PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB ---- [Solved] 8457 Manimaran Ramaraj 08/21/2009 06:18AM
The Answer 4 FK Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB ---- [Solved] 9146 yvonne kire 08/21/2009 05:00PM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 6918 elango elango 12/07/2005 12:51AM
Can't create table (errno: 150) :: InnoDB 11031 Vikram Tambe 05/13/2008 09:38AM
Solved! Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 6950 T D 06/25/2009 03:30AM
Re: Solved! Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 5652 Roland Booth 06/26/2009 10:23AM
Re: Solved! Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 1999 Colleen Boye 12/13/2011 12:43PM
[Solved] Re: Solved! Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 2854 Anand H 02/10/2011 07:24AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 2670 Arturs Pelniks 08/04/2010 03:04AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 5621 krishnakumar M 10/14/2008 04:36AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 5477 Mikhail Shalai 12/02/2008 09:05AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 5269 Ankit Garg 02/17/2009 01:46AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB 3685 perez kakaire 06/22/2010 06:42AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB: Solved 4023 perez kakaire 06/22/2010 06:44AM
Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB: Solved 3557 David Brown 06/29/2010 07:48AM
Re: ERROR 1005: Can't create table (errno: 150) 7776 José Martínez Benavides 12/06/2005 06:22AM
Re: ERROR 1005: Can't create table (errno: 150) 7107 Łukasz Grzenkowicz 03/18/2009 11:56AM
Re: ERROR 1005: Can't create table (errno: 150) 5082 Lisa DeSouza 04/23/2009 07:03AM
Re: ERROR 1005: Can't create table (errno: 150) 7294 satya pal 12/16/2005 12:53AM
Re: ERROR 1005: Can't create table (errno: 150) 7250 emir mahmut bahsi 05/18/2006 12:01PM
Re: ERROR 1005: Can't create table (errno: 150) Possible solution 10462 FREDERIC BEGIN 01/03/2006 11:53AM
Re: ERROR 1005: Can't create table (errno: 150) Possible solution 7972 DnlCY 05/03/2006 06:23AM
Re: ERROR 1005: Can't create table (errno: 150) 6673 Gilles GUEDIKIAN 06/15/2006 07:56AM
Re: ERROR 1005: Can't create table (errno: 150) 7972 Paul Carey 02/27/2007 10:58AM
Re: ERROR 1005: Can't create table (errno: 150) 8371 amol.viit 04/03/2007 07:40PM
Re: ERROR 1005: Can't create table (errno: 150) 6384 KimSeong Loh 04/05/2007 08:57PM
Re: ERROR 1005: Can't create table (errno: 150) 6706 Filippo Monti 10/25/2006 02:14AM
Re: ERROR 1005: Can't create table (errno: 150) 6347 Brendan Abbott 10/25/2006 09:11PM
Re: ERROR 1005: Can't create table (errno: 150) 6910 Albert Arul prakash Rajendran 04/25/2007 03:23AM
Re: ERROR 1005: Can't create table (errno: 150) 6645 Anadi Misra 08/08/2007 07:09AM
Re: ERROR 1005: Can't create table (errno: 150) 6860 Felix Geerinckx 08/08/2007 07:13AM
Re: ERROR 1005: Can't create table (errno: 150) 7381 Alexei Guevara 08/22/2007 09:34AM
Re: ERROR 1005: Can't create table (errno: 150) 6305 Wagner Bianchi 12/17/2007 04:31PM
Re: ERROR 1005: Can't create table (errno: 150) 10210 Andrey Svitlow 01/12/2008 06:00AM
Re: ERROR 1005: Can't create table (errno: 150) 6794 Victor Cherkassky 01/18/2008 06:34AM
Re: ERROR 1005: Can't create table (errno: 150) 6568 T D 02/01/2008 06:47AM
Re: ERROR 1005: Can't create table (errno: 150) 6394 Bug Me Not 02/12/2008 04:46AM
Re: ERROR 1005: Can't create table (errno: 150) [Probable Solution] 9655 Kishore Bulusu 02/16/2008 01:29PM
Re: ERROR 1005: Can't create table (errno: 150) [Probable Solution] 9020 JOBY JOB 03/05/2008 02:59AM
Re: ERROR 1005: Can't create table (errno: 150) [Probable Solution] 7696 Willem P 03/17/2008 07:00AM
Re: ERROR 1005: Can't create table (errno: 150) [Probable Solution] 3220 karthik bhaskaran 06/11/2010 02:55AM
Re: ERROR 1005: Can't create table (errno: 150) [Probable Solution] 6855 Roberto Linares 04/09/2008 11:25AM
Re: ERROR 1005: Can't create table (errno: 150) [Probable Solution] 8234 Adam Franco 04/16/2008 01:37PM
Re: ERROR 1005: Can't create table (errno: 150) 7240 Håkan Askengren 02/26/2008 11:46PM
Re: ERROR 1005: Can't create table (errno: 150) 9573 C Fischer 05/30/2008 07:43AM
Re: ERROR 1005: Can't create table (errno: 150) [Oracle Conversion Potential Solution] 8419 Kevin Clark 06/03/2008 06:52AM
Re: ERROR 1005: Can't create table (errno: 150) 6809 Eduardo Chico 06/17/2008 09:39PM
This worked for me 8169 Kyle Stevens 08/27/2008 08:08AM
A solution to: ERROR 1005: Can't create table (errno: 150) 13961 Andrew Pitonyak 09/10/2008 12:37PM
Re: A solution to: ERROR 1005: Can't create table (errno: 150) 5090 Bhanu Nadendla 06/10/2009 02:29PM
Re: A solution to: ERROR 1005: Can't create table (errno: 150) 4853 ka sanoob 06/29/2009 07:17AM
Considerations: Re: ERROR 1005: Can't create table (errno: 150) 6591 Albert Lombarte 10/22/2008 05:31AM
Unsigned was the problem!! 8805 Franck Mercado 12/03/2008 10:15AM
He's right 5256 Liron Homapour 05/01/2009 07:39AM
Re: ERROR 1005: Can't create table (errno: 150) 3800 elliot Justice 01/26/2010 12:34PM
Re: ERROR 1005: Can't create table (errno: 150) 13689 Stefan Wallin 11/12/2008 01:20PM
Re: ERROR 1005: Can't create table (errno: 150) 7103 Erin W 12/05/2008 11:05AM
Re: ERROR 1005: Can't create table (errno: 150) 5890 banaz kaki 05/05/2009 02:52PM
SOLVED AGAIN: More info - Error 1005 is connected to Error 1452 6872 Mohamed Infiyaz Zaffer Khalid 05/07/2009 10:12PM
Re: ERROR 1005: Can't create table (errno: 150) 5207 Juan Carlos Rubiano 05/25/2009 10:50AM
Re: ERROR 1005: Can't create table (errno: 150) 5120 kashif murtaa 06/02/2009 08:22PM
PLEASE STATE YOUR PROBLEM Re: ERROR 1005 (errno: 150) 5518 Mohamed Infiyaz Zaffer Khalid 06/02/2009 10:04PM
Re: PLEASE STATE YOUR PROBLEM Re: ERROR 1005 (errno: 150) 5379 Felix Glez 06/08/2009 01:28AM
Re: PLEASE STATE YOUR PROBLEM Re: ERROR 1005 (errno: 150) 5420 Felix Glez 06/08/2009 02:04AM
Re: PLEASE STATE YOUR PROBLEM Re: ERROR 1005 (errno: 150) 5488 Andrew Pitonyak 06/28/2009 03:41PM
Re: ERROR 1005 (errno: 150) 2513 Glenn Strickland 08/29/2011 04:46PM
Re: ERROR 1005: Can't create table (errno: 150) 5526 Jeremy Hatcher 08/12/2009 09:29AM
Re: ERROR 1005: Can't create table (errno: 150) 4112 s l 12/15/2009 01:48PM
Re: ERROR 1005: Can't create table (errno: 150) 5426 Aftab Haider 10/19/2009 03:09AM
my problem were different data types 4125 Sebastian Kahl 12/22/2009 02:54AM
Re: ERROR 1005: Can't create table (errno: 150) 3695 Max Mir 02/01/2010 01:49PM
Re: ERROR 1005: Can't create table (errno: 150) 3761 Tuan Nguyen 02/20/2010 09:56PM
Re: ERROR 1005: Can't create table (errno: 150) (Potential solution) 5383 Niranjan Hoskote 03/02/2010 02:06PM
Re: PARENT HAS GOOD SOLUTIONS! 2390 raachachacha 02/18/2011 08:55AM
Re: ERROR 1005: Can't create table (errno: 150) - Please help 4426 Anil Karamchandani 03/14/2010 12:41AM
Re: ERROR 1005: Can't create table (errno: 150) - Please help 3712 Vishwanath Savakar 04/15/2010 07:10AM
Re: ERROR 1005: Can't create table (errno: 150) 3614 Nick Blackwood 04/24/2010 04:47PM
Re: ERROR 1005: Can't create table (errno: 150) 3898 Jacques Meyer 04/28/2010 01:51PM
Re: ERROR 1005: Can't create table (errno: 150) [SOLVED] 4461 Ivan Gromov 07/06/2010 07:36AM
Re: ERROR 1005: Can't create table (errno: 150) 2808 Bill Cogan 07/09/2010 12:21PM
Re: ERROR 1005: Can't create table (errno: 150). [SOLVED] An other solution 4360 Adrian Meyer 07/12/2010 12:49PM
Re: ERROR 1005: Can't create table (errno: 150) 3288 Arturs Pelniks 08/04/2010 05:43AM
Re: ERROR 1005: Can't create table (errno: 150) - my SOLUTION 3514 David Cardoso 09/21/2010 03:31PM
Re: ERROR 1005: Can't create table (errno: 150) - my SOLUTION 3130 Luca Porro 09/27/2010 02:23AM
Re: ERROR 1005: Can't create table (errno: 150) - my SOLUTION 2858 David Cardoso 10/06/2010 03:23PM
Re: ERROR 1005: Can't create table (errno: 150) DEFINITE SOLUTION!!! 4543 Emin Ogur 10/07/2010 10:25PM
Re: ERROR 1005: Can't create table (errno: 150) DEFINITE SOLUTION!!! 4607 Mahder Gebremedhin 10/08/2010 06:54PM
Re: ERROR 1005: Can't create table (errno: 150) [SOLVED] 3595 Nacho Pas 01/26/2011 12:32PM
Re: ERROR 1005: Can't create table (errno: 150) 4221 Kann Vearasilp 11/05/2010 09:08AM
Re: Known Causes PLUS ONE 2919 asd asd 05/24/2011 10:11AM
Re: ERROR 1005: Can't create table (errno: 150) 3153 acoolme.com hulu 08/17/2011 11:24PM
Re: ERROR 1005: Can't create table (errno: 150) 43909 Chetan Dhumale 11/18/2011 12:31AM
Various reasons and solutions for Error 150 (and other foreign key errors) 2848 Philip Flammer 06/07/2012 01:22AM
Re: ERROR 1005: Can't create table (errno: 150) 1507 Fredrik k 07/25/2012 08:38AM
ERROR 1005: Can't create table (errno: 150) (New solution) 3532 Yomna Mahmoud 07/30/2012 06:05AM
Re: ERROR 1005: Can't create table (errno: 150) (New solution) 2494 Babak Bandpey 09/25/2012 07:19AM
Yet another mismatch (yet another solution) 2101 Gavin Stokes 10/09/2012 10:24PM
Re: ERROR 1005: Can't create table (errno: 150) 2393 Marko Mäkelä 01/13/2013 04:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.