SQL: Alias Column Name for Use in CASE Statement -


Is it possible for the column name of the name and then use it in a case statement? For example, select

  as the case of col1, when a = 'test' then 'yes' in the form of the END table;  

I am trying to surname the column because in reality my case statement programmatic will arise, and I want the column to be in the case statement with the second to be specified in SQL Instead of using the parameter in the program

I think mySql and MsSql will not allow this because they will try all the columns in the CAE section Find the columns in the WHERE section as tables.

I do not know what you are talking about, but I think you can do anything like this in DBMS:

  SELECT *, in case When a = 'test' then 'yes' as the value of the value (select 1 as a table from 1) q  

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 -