MySQL joins are not case-sensitive!

I just realized that joins in SQL in DOMO are not case sensitive! This is a huge problem for me and my team. Here's an example:

 

table_1:

teammanager_id
SalesJohn123
MarketingJoe341

 

table_2:

locationmanager_id_2
MichiganJohn123
CaliforniaJOhn123
TexasJOHN123

 

 

select

table_1.*,
table_2.*

from table_1

left join table_2 on table_1.manager_id = table_2.manager_id_2

 

I get:

teammanager_idlocationmanager_id_2
SalesJohn123MichiganJohn123
SalesJohn123MichiganJOhn123
SalesJohn123MichiganJOHN123
MarketingJoe341  

 

Can anyone tell how to make the join case sensitive?

Comments

  • GrantSmith
    GrantSmith Indiana 🔴

    Hi @user022825 

     

    You can utilize the BINARY keyword to force MySql dataflow to do a case sensitive join.

     

    select
    
    table_1.*,
    table_2.*
    
    from table_1
    
    left join table_2 on BINARY table_1.manager_id = table_2.manager_id_2