Newbie help needed on Functions

Поиск
Список
Период
Сортировка
От Jim Steil
Тема Newbie help needed on Functions
Дата
Msg-id 002101c263fc$7e846730$6401a8c0@office
обсуждение исходный текст
Список pgsql-novice
Hi:
 
I want to create a function that will return rows from a table based upon a parameter that I pass.
 
TABLE - NAMES
int ID,
varchar(50) NAME,
varchar(50) ADDRESS,
char(2) STATE
 
I would like my function to return the same result as it would if I entered the following SQL statement:
 
select ID, NAME, ADDRESS from NAMES where STATE = 'WI';
 
I want to pass 'WI' as a parameter.  I have looked through the programming guide but am confused by the return type and such.  Any help or pointers to further documentation would certainly be appreciated.
 
    -Jim

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

Предыдущее
От: "Joachim Smit"
Дата:
Сообщение: Re: Disk space
Следующее
От: David Lloyd
Дата:
Сообщение: Re: Disk space