MySQL Forums
Forum List  »  Newbie

How can I create a complex view?
Posted by: Mircea Manea
Date: April 09, 2021 03:00AM

Dear all,

I have 2 tables tbl1 and tbl2 in a relationship one-to-many.
I need to obtain a view from this 2 tables for all rows in tbl1 that has at least one corresponding row in tbl2.
And the view must look like this:
- 1 row with a predefined info1 (like a header)
- 1 row with the row that have a corresponding rows in tbl2
- 1 row with a predefined info2 (like a header)
- n rows from tbl2 related to the above row from tbl1
-... and so on...

And I need to do that on the server side.

Is there a solution to solve this or it's impossible?

Thanks a lot,
Mircea

Options: ReplyQuote


Subject
Written By
Posted
How can I create a complex view?
April 09, 2021 03:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.