+2 votes
in Databases by (13.1k 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

0 votes
by (20k points)

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

SELECT Id, 'PPI' AS Source FROM tableName;

...