SQL field splicing

SQL splicing two fields to get the mobile phone number

LEFT(CONCAT_WS("",f.contacttel,s.phone),11)

SQL splicing two fields

CONCAT_WS("",c.id_card,f.certid)

The SQL splicing field takes the first one that is not empty

COALESCE(f.username,c.username)

Guess you like

Origin blog.csdn.net/qq_41941497/article/details/127361310