sql - Is there a way to display the table orgin for rows in a union -
when union n amount of tables there way add column result set says table row came from?
sure - add hard coded text column each statement.
select 'this came table a' sourcetable, id, name tablea -- union -- select 'this came table b' sourcetable, id, name tableb
Comments
Post a Comment