Home > database >  SQL when field 1 for liu field is the same to be obtained when the title
SQL when field 1 for liu field is the same to be obtained when the title

Time:11-07



When the field 1 for liu field is the same to be obtained when the title

CodePudding user response:

Select table 1. ID case when table 1. The field 1='liu' then table 2. The title the else table 1. The field 1
From table 1
Inner join table 2 on table 1. ID=table 2. ID
  • Related