Skip site navigation (1) Skip section navigation (2)

Indicators

From: Atif Jung <atifjung(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Indicators
Date: 2010-04-27 11:05:29
Message-ID: u2kd1c6b9c51004270405n9358def3wa671566bb71048ec@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
Am I correct in understanding that when doing a select on a table I cannot
retrieve a NULL value from the database directly into the variable I'm
selecting into, but I must use an indicator. So for example

EXEC SQL SELECT b INTO :val FROM test1;

will fail if b is NULL, so I must use

EXEC SQL SELECT b INTO :val :val_ind FROM test1;

and then check the value of val_ind. If 0 then val is not NULL is -ve then
it is NULL?

Thanks

Atif

Responses

pgsql-novice by date

Next:From: Alan SimonDate: 2010-04-27 15:51:44
Subject: Program Syntax Help Needed
Previous:From: Devrim GÜNDÜZDate: 2010-04-26 18:38:16
Subject: Re: install both i386 and x86_64 libs

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group