Select different field in mysql if a field is set to null? -


I select the displayname as the user name if username = null and if the user name is not null Then select the username as the username. example.

  id user name name 1 xyz null 2 ​​null aBC  

Select how I can do this in a single statement ... Thank you

Collages (user name, vip name) should help you.

Example:

  The user from selected Coleses (Username, Dzemen) where ...  

Comments

Popular posts from this blog

ios - Form Sheet content disappearing -

Lists in scheme -

c++ - an enclosing-function local variable cannot be referenced in a lambda body unless if it is in capture list -