Select from table with additional predefined records not existing in database

Viewed 39

Is it possible to Select rows from table in database with addition of predefined rows not existing in database?

SELECT Name 
FROM [dbo].[TableFoo] -> returns Names (Name1, Name2, Name3)

I want it to additionally return predefined value 'NameNotInDatabase':

SELECT Name 
FROM [dbo].[TableFoo] + some tsql -> returns Names (Name1, Name2, Name3, NameNotInDatabase)
1 Answers

Are you looking for UNION ALL?

SELECT Name
FROM [dbo].[TableFoo]
UNION ALL
SELECT 'NameNotInDatabase';
Related