How to join two tables based on substring values of fields?

后端 未结 4 635
予麋鹿
予麋鹿 2021-01-05 07:34

I am having problem with sql. I want to join two tables, employee and class instructor. Condition is that employee is having unid column like \'u0871457\' where as class i

4条回答
  •  抹茶落季
    2021-01-05 08:25

    select e.name, i.name
     from  Employee e
     inner join Instructor i on SUBSTR(e.id, 2, LENGTH(e.id) - 1) = SUBSTR(i.id, 2, LENGTH(i.id) - 1)
    

    Your DB uses 1-based indexing.

提交回复
热议问题