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

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -