Select & Tables X Select & Views

Поиск
Список
Период
Сортировка
От Rodrigo Rezende
Тема Select & Tables X Select & Views
Дата
Msg-id 38AD95C6.C8020910@hortolandia.marelli.it
обсуждение исходный текст
Ответы Re: [SQL] Select & Tables X Select & Views  ("Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>)
Список pgsql-sql
Hello all!,

Using the following query :
select * from taba, tabb;


The result will be taba's number of rows * tabb's number of rows
result = rows(taba) * rows(tabb)

1.ex.:

taba :
1
2
3

tabb
a
b

select * from taba, tabb; :
1 | a
2 | a
3 | a
1 | b
2 | b
3 | b

This occurred because I didn't use the clause Join and Where...

But, using a View instead of tabb(table), the number of rows was the
same of the view

2. ex.:
taba :
1
2
3

viewb
a
b

select * from taba, viewb; :

1 | a
1 | b

Why this occurred? I would like this second example returned the same as
the first

Thanks a lot,

Rodrigo C. Rezende



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Mohit Marwaha"
Дата:
Сообщение: Kindly stop sending please !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1
Следующее
От: "Ross J. Reedstrom"
Дата:
Сообщение: Re: [SQL] Select & Tables X Select & Views