+2 votes
in Databases by (71.8k points)
edited by

I am trying to run a SELECT query to include a column that is not present in the table. How can I do it?

E.g. 

IdSource
13972PPI
13474PPI
13393PPI

My table has only the "Id" column; the "Source" column does not exist. 

1 Answer

+1 vote
by (348k points)
selected by
 
Best answer

You can use the following SQL to include the "Source" column.
 

SELECT Id, 'PPI' AS Source FROM tableName;

Related questions


...