Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9274769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:25:47+00:00 2026-06-18T16:25:47+00:00

I just started learning MYSQL in college and I have an important assignment to

  • 0

I just started learning MYSQL in college and I have an important assignment to do for my class. I have to create a small database and I can’t seem to add a table with foreign keys because of the errno(150)
Here’s what I have.

create table Country
(CountryName varchar (50) not null,
Primary Key (CountryName));

create table InterestGroup
(IntrestgrpName varchar (30) not null,
Primary Key (IntrestgrpName));

create table Organisation
(OrgName varchar (50) not null,
OrgAddress varchar (30),
OrgTelNo.varchar (30),
Primary Key (OrgName));

create table Qualification
(QualName varchar (50) not null,
Primary Key (QualName));

create table Member
(MemberID varchar (15) not null,
MemberName varchar (30),
MemberAdd varchar (50) not null,
CountryName varchar (50) not null,
IntrestgrpName varchar (30) not null,
QualName varchar (50) not null,
OrgName varchar (50) not null,
Primary Key (MemberID),
Foreign Key (CountryName) References Country (CountryName),
Foreign Key (IntrestgrpName) References InterestGroup (InterestgrpName),
Foreign Key (QualName) References Qualification (Qualname),
Foreign Key (OrgName) References Organisation (OrgName));

I cant seem to get the Member table to be created, It gives this error,
ERROR 1005 (HY000): Can’t create table ‘iicp.member’ (errno: 150)
Thanks in advance for the help, I really need to solve this

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T16:25:49+00:00Added an answer on June 18, 2026 at 4:25 pm

    here the working query

    create table Country
    (CountryName varchar (50) not null,
    Primary Key (CountryName));
    
    create table InterestGroup
    (IntrestgrpName varchar (30) not null,
    Primary Key (IntrestgrpName));
    
    create table Organisation
    (OrgName varchar (50) not null,
    OrgAddress varchar (30),
    OrgTelNo varchar (30),
    Primary Key (OrgName));
    
    create table Qualification
    (QualName varchar (50) not null,
    Primary Key (QualName));
    
    create table Member
    (MemberID varchar (15) not null ,
    MemberName varchar (30),
    MemberAdd varchar (50) not null,
    CountryName varchar (50) not null,
    IntrestgrpName varchar (30) not null,
    QualName varchar (50) not null,
    OrgName varchar (50) not null,
    Primary Key (MemberID), 
    Foreign Key (CountryName) References Country (CountryName),
    Foreign Key (IntrestgrpName) References InterestGroup (IntrestgrpName),
    Foreign Key (QualName) References Qualification (Qualname),
    Foreign Key (OrgName) References Organisation (OrgName));
    

    DEMO HERE SQLFIDDLE

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just started learning MySQL and am having trouble extracting matching flights from
I have a problem with my PDO class. I just have started learning OOP
Just started learning Haskell. I have an empty source file with this inside: pe
I just started learning SL. I have tried to resize all the elements inside
I just started learning Objective-C and OOP ... so I have very stupid question
I just started learning on WCF and is trying to create a WCF service
I have just started learning the concept of Object oriented programming and have put
I just started learning C++ couple of weeks ago. So now I have this
I have just started learning java and i have about 8 months time. My
I just started learning MySQL, and the book I'm reading has the following example:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.