Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql error 1215

I'm guessing that Clients.Case_Number and/or Staff.Emp_ID are not exactly the same data type as Clients_has_Staff.Clients_Case_Number and Clients_has_Staff.Staff_Emp_ID.

Perhaps the columns in the parent tables are INT UNSIGNED?

They need to be exactly the same data type in both tables.
Comment

mysql error 1215

When you are trying to reference a key on parent table which is not a candidate key (either a primary key or a unique key) you may get the error code: 1215 cannot add foreign key constraint. ... It does not necessarily to be a primary key. MySQL requires index on corresponding referenced key, so you need a unique key
Comment

PREVIOUS NEXT
Code Example
Sql :: How to insert NULL value in MySQL 
Sql :: does sql auto increment start at number if it is removed? 
Sql :: fetch second word from a string in ms sql 
Sql :: bus source and destination equal to destination and source of another by sql query 
Sql :: sql orcale i forgot what my name & password was 
Sql :: How To Execute SQL Select Statements 
Sql :: how to ignore the data based on specific keywords? 
Sql :: VYSTUPNI PARAMETR ULOZENE PROCEDURY SQL 
Sql :: sql set devault value with existing column 
Sql :: get who is hired in january in sql 
Sql :: oracle sql add column auto generated value 
Sql :: sql to linq converter online free 
Sql :: call function sql oracle with output put line 
Sql :: oracle grant create job 
Sql :: mysql dump everythign 
Sql :: how to get data from 2 database 
Sql :: check psql validity function 
Sql :: postgresql regular expression special characters 
Sql :: postgresql display subquery as json 
Sql :: mysql password reset 
Sql :: create sql database 
Sql :: employee sample data mysql 
Sql :: mysql count with two joins 
Sql :: firebase sql 
Sql :: select even number id data from table 
Sql :: SOQL Child to parent 
Sql :: partitioning in oracle-base 
Sql :: Rows, INSERT INTO 
Sql :: how to insert multiple values in a single column in sql 
Sql :: docker mysql connection refused 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =