Обсуждение: Search inherited tables

Поиск
Список
Период
Сортировка

Search inherited tables

От
Stephan Richter
Дата:
Hello everyone,

I have he following situation:

I have a 'base' table called Problem and 5 other tables that inherit
Problem: MultipleChoiceProblem, TrueFalseProblem, EssayProblem,
NumericProblem and MatchProblem

I want to do the following query:

SELECT * FROM Problem;

But Problem is empty, since I fill only the derived tables. How can I make
this query?

Thanks for your help in advance!

Regards,
Stephan
--
Stephan Richter
CBU - Physics and Chemistry Student
Web2k - Web Design/Development & Technical Project Management


Re: Search inherited tables

От
Chris
Дата:
Well this is a common request, and a problem that I personally have been
looking at solving, but right now you can't do it in a straight-forward
way. You just have to make a separate query on each table. The
inheritance will only help you if there is some commonality in the base
table that you can do more general queries on. Hopefully in the future
you will be able to do what you want.


Stephan Richter wrote:
>
> Hello everyone,
>
> I have he following situation:
>
> I have a 'base' table called Problem and 5 other tables that inherit
> Problem: MultipleChoiceProblem, TrueFalseProblem, EssayProblem,
> NumericProblem and MatchProblem
>
> I want to do the following query:
>
> SELECT * FROM Problem;
>
> But Problem is empty, since I fill only the derived tables. How can I make
> this query?
>
> Thanks for your help in advance!
>
> Regards,
> Stephan
> --
> Stephan Richter
> CBU - Physics and Chemistry Student
> Web2k - Web Design/Development & Technical Project Management