Re: Adding flexibilty to queries
От | Mike Nolan |
---|---|
Тема | Re: Adding flexibilty to queries |
Дата | |
Msg-id | 200403251445.i2PEjfFf014846@gw.tssi.com обсуждение исходный текст |
Ответ на | Adding flexibilty to queries (Alan Carbutt <arcarbut@adams.edu>) |
Ответы |
Re: Adding flexibilty to queries
|
Список | pgsql-general |
> > I have a question regarding psql. As I am more familiar with oracle I > > can write the following select and make it rather flexible: > > select name > > from name_table > > where person_id = &id; > > The &id portion is what I am looking for in PostgreSQL. Basically when > > running this query, the person running the query is prompted to supply a > > value. What is the equivalent in postgres? It doesn't work interactively, but you can assign variables like this: select name from name_table where person_id = :id; I have to admit there are some sqlplus features I miss too (like the break and compute features), and maybe one of these days I'll miss them enough to add them to psql. :-) -- Mike Nolan
В списке pgsql-general по дате отправления: