Re: Was: Triggers, Stored Procedures, PHP
От | Shane D |
---|---|
Тема | Re: Was: Triggers, Stored Procedures, PHP |
Дата | |
Msg-id | 3FC95A88.3020708@wright.edu обсуждение исходный текст |
Ответ на | Re: Was: Triggers, Stored Procedures, PHP (Doug McNaught <doug@mcnaught.org>) |
Ответы |
Re: Was: Triggers, Stored Procedures, PHP
|
Список | pgsql-general |
Doug McNaught wrote: > It's false. You can treat a view just like a table and add clauses to > your query that restrict it beyond what the view gives you. I think > that's what you're asking about... Thanks for your reply. I found an example in the postgresql reference manual in the "CREATE VIEW" section that shows exactly what you said (reproduced below). CREATE VIEW kinds AS SELECT * FROM films WHERE kind = ’Comedy’; The manual uses the view thusly: SELECT * FROM kinds; But what if the films table also had a field for the production company. This implies based on the view definition that it too, has the field (call it prod_co). Could I use the following query to select all Comedy films distributed by the 'Small Company' production company? SELECT * FROM kinds WHERE prod_co = 'Small Company'; Yes this is contribed, but humor me please. Shane
В списке pgsql-general по дате отправления: