Re: Insert null in int column

From: dmp <danap(at)ttc-cmc(dot)net>
To: venkata siva prasad <vsp_29(at)rediffmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Insert null in int column
Date: 2010-11-22 19:56:40
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-jdbc

Hello Prasad,

Attached class that should demostrate the insert you desire. The
insertion for Postgresql via SQL can be done through two different

Singular Example:
INSERT/REPLACE INTO "bigInt_types" ("data_type_id", "bigint_type") VALUES (NULL,
INSERT/REPLACE INTO "bigInt_types" ("data_type_id", "bigint_type") VALUES (NULL,

Plural Example:
INSERT/REPLACE INTO "bigInt_types" ("data_type_id", "bigint_type") VALUES (NULL,
'5'),(NULL, '-65');


venkata siva prasad wrote:
> Hi,
> I have created the table as below.
> create table test(id numeric(4),name character varying(8));
> I need to insert null as below.
> insert into test values(null,'aaa');
> But I am getting error as "Integer expecting..."
> Can you please help me on this.
> Regards,
> Prasad
> <>

Attachment Content-Type Size text/plain 5.9 KB

In response to


Browse pgsql-jdbc by date

  From Date Subject
Next Message dmp 2010-11-22 20:04:25 Re: Insert null in int column
Previous Message Thomas Kellerer 2010-11-22 18:59:26 Re: getTables() doesn't handle umlauts correctly