Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Create table as select union select gives invalid SQL error

tx103108Jan 31 2010 — edited Jan 31 2010
O/S: Solaris 10
DB: Oracle 10g

CREATE MATERIALIZED VIEW my_view
as
select *
from table a

union

select *
from table b;

I get ORA-00900: invalid SQL statement. Any ideas? It seems to complain about the union. Each select works by itself with no issues and the columns are the same between selects.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 28 2010
Added on Jan 31 2010
10 comments
2,194 views