Re: Auomatic numbering, replacing nulls and IF
От | Ian Harding |
---|---|
Тема | Re: Auomatic numbering, replacing nulls and IF |
Дата | |
Msg-id | sc98426c.029@mail.tpchd.org обсуждение исходный текст |
Ответ на | Auomatic numbering, replacing nulls and IF ("Pestilence" <me@work.com>) |
Список | pgsql-general |
ISNULL (T-SQL) Replaces NULL with the specified replacement value. Syntax ISNULL(check_expression, replacement_value) Arguments check_expression Is the expression to be checked for NULL. check_expression can be of any type. replacement_value Is the expression to be returned if check_expression is NULL. replacement_value must have the same type as check_expresssion. Return Types Returns the same type as check_expression. Remarks The value of check_expression is returned if it is not NULL; otherwise, replacement_value is returned. Ian A. Harding Programmer/Analyst II Tacoma-Pierce County Health Department (253) 798-3549 mailto: iharding@tpchd.org >>> Thomas Lockhart <thomas@fourpalms.org> 03/20/02 07:14AM >>> ... > 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? Look at COALESCE(). Does ISNULL() actually do something different in Oracle and M$SQL? I'm curious because our definition conforms to the SQL9x standard, and those databases claim to generally conform also. - Thomas ---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives? http://archives.postgresql.org
В списке pgsql-general по дате отправления: