CodingNoob
CodingNoob

Reputation: 59

How to have a dummy value in a SQL select statement column?

So far I have a column that doesn't need values under the field, so I did: SELECT NULL AS Column1.

However, how do I query a column to actually have dummy values under it, say 'X' in all the rows for that column?

ex:

ID   |  Column2
 1   |   x
 2   |   x
 3   |   x
 4   |   x

Upvotes: 0

Views: 1307

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1270091

The same way, just provide a value:

select id, 'X' as column2
from t;

Upvotes: 1

Related Questions