Oracle: Create a View with Auto Increment id column Oracle: Create a View with Auto Increment id column oracle oracle

Oracle: Create a View with Auto Increment id column


You can do a select over the union, for example:

SELECT rownum(),*FROM (SELECT * FROM tableA UNION ALL SELECT * FROM tableB)

UPDATED

SELECT rownum, t.*FROM (SELECT * FROM tableA UNION ALL SELECT * FROM tableB) t