I want to add a column in a query that does not exist in a table and return it as a result. So lets say TABLE_TEST has column A, B and I want to return values for A, B and C. I am trying to do
SELECT A, B, C=3 FROM TABLE_TEST
or
SELECT *, C=3 FROM TABLE_TEST
Can this be done in MySQL, Postgresel or MSSQL?
select 3 as c from tableworks,select dummy as c from tableorselect "dummy" as c from tabletry to look for a column already nameddummy, so you needselect 'dummy' as c from table. Might vary with your SQL engine. Via stackoverflow.com/questions/2504163/… and stackoverflow.com/questions/5185743/…