简体   繁体   中英

Creating views from tables that have types in Oracle SQL Developer

I am working with the oe schema in oracle sql developer and I need to create a view that joins multiple tables, some of which have types or "nested" attributes.

Is there a way to put those nested attributes into a different table or eliminate them entirely? I am a relative beginner and I cant seem to find a way or similar problem online.

在此处输入图片说明

Here is my query and I don't even know where to start with this, any help is appreciated.

There is no magic flag to exclude nested tables.

What you need to do is replace the * with the names of the columns you want to include. Yes that is a lot of typing but the bonus is your view has a coherent projection. At the moment your view has multiple instances of CUSTOMER_ID, ORDER_ID, PRODUCT_ID and CATEGORY_ID. That's illegal and confusing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM