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 8664343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:13:08+00:00 2026-06-12T17:13:08+00:00

I have searched for the problem but cant find a solution. Its a one-to-one

  • 0

I have searched for the problem but cant find a solution.

Its a one-to-one relation and i have the same problem with an other table that has a FK to staff

i keep getting a

  error 1005 error no 105

Table Structure

CREATE TABLE `staff` (
  `StaffNumber` varchar(5) NOT NULL,
  `Firstname` varchar(45) DEFAULT NULL,
  `Lastname` varchar(45) DEFAULT NULL,
  `Insertion` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`StaffNumber`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8


CREATE TABLE `airmarshall` (
  `weaponNumber` int(11) NOT NULL,
  `Nationality` varchar(45) NOT NULL,
  `Snumber` varchar(5) NOT NULL,
  `SnumberA` varchar(5) NOT NULL,
  PRIMARY KEY (`Snumber`,`SnumberA`),
  CONSTRAINT `staff_ibfk_1` FOREIGN KEY (`Snumber`) REFERENCES `staff` (`StaffNumber`)     
  ON DELETE CASCADE ON UPDATE CASCADE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8
  • 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-12T17:13:09+00:00Added an answer on June 12, 2026 at 5:13 pm
     In Mysql Server version: 5.1.60   
    
    
    mysql> CREATE TABLE `staff` (   `StaffNumber` varchar(5) NOT NULL,   `Firstname` varchar(45) DEFAULT NULL,   `Lastname` varchar(45) DEFAULT NULL,   `Insertion` varchar(45) DEFAULT NULL,   PRIMARY KEY (`StaffNumber`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
        Query OK, 0 rows affected (0.15 sec)
    
    
        mysql> CREATE TABLE `airmarshall` (
            ->   `weaponNumber` int(11) NOT NULL,
            ->   `Nationality` varchar(45) NOT NULL,
            ->   `Snumber` varchar(5) NOT NULL,
            ->   `SnumberA` varchar(5) NOT NULL,
            ->   PRIMARY KEY (`Snumber`,`SnumberA`),
            ->   CONSTRAINT `staff_ibfk_1` FOREIGN KEY (`Snumber`) REFERENCES `staff` (`StaffNumber`)     
            ->   ON DELETE CASCADE ON UPDATE CASCADE
            ->  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
        Query OK, 0 rows affected (0.16 sec)
    
        mysql> show create table airmarshall;
        -----------------------------------+
        | airmarshall | CREATE TABLE `airmarshall` (
          `weaponNumber` int(11) NOT NULL,
          `Nationality` varchar(45) NOT NULL,
          `Snumber` varchar(5) NOT NULL,
          `SnumberA` varchar(5) NOT NULL,
          PRIMARY KEY (`Snumber`,`SnumberA`),
          CONSTRAINT `staff_ibfk_1` FOREIGN KEY (`Snumber`) REFERENCES `staff` (`StaffNumber`) ON DELETE CASCADE ON UPDATE CASCADE
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8 |
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched the web but I cannot find the solution to my problem.
I have searched a lot to find a solution for my problem, but I
I have searched the site for this simple problem but cant find an answer.
I searched for this problem but couldn't find solution that works for me. I'm
I've searched google and SO for a solution to this problem but have not
I have searched for a general solution to this but only find answers to
I've searched for a solution for my problem all over but I cannot find
I have searched but cant find this question anywhere. My wife and I are
I have searched a lot of threads but i can't find any answer that
I have searched/Googled around but I'm struggling with the following problem. I am building

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.