If I have the following two tables :
I will do a UNION for having :
The question is : In my result, how can I creat a dumn column of differenciate the data from my tables ?
I want to know from with table the entry is from withouth adding a new column in the database...
SELECT Employes.name FROM Employes UNION SELECT Customers.name FROM Customers;
Just introduce a constant addition to the column (rather than the table):
SELECT name || ' (Emp)' as name FROM Employees UNION SELECT name || ' (Cus)' as name FROM Customers;
and spell "Employees" correctly :-)