| От | Jean-Michel POURE |
|---|---|
| Тема | Re: Auomatic numbering, replacing nulls and IF |
| Дата | |
| Msg-id | 200203201555.g2KFt292009534@www1.translationforge обсуждение исходный текст |
| Ответ на | Auomatic numbering, replacing nulls and IF ("Pestilence" <me@work.com>) |
| Список | pgsql-general |
Le Jeudi 14 Mars 2002 21:52, Pestilence a écrit : > 1) Is it possible to create an INT PRIMARY KEY column that automagically > numbers itself? MS-SQL does this using the IDENTITY keyword. Use serial type. > 2) The ISNULL function in both Oracle and MS-SQL takes 2 numbers and > returns the second if the first is null, otherwise it returns the first. > ISNULL in Postgres seems to be something quite different. Before I go > writing my own function to do it, is there one already? See COALESCE and NULLIF at http://www.postgresql.com/idocs/index.php?functions-conditional.html > 3) How do I do 'IF this_sql THEN that_sql'? I keep getting: > parse error at or near "IF" CASE WHEN condition THEN result [WHEN ....] ELSE Cheers, Jean-Michel POURE
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера