[INSERT]Insert blank values - Mailing list pgsql-novice

From Leví Teodoro da Silva
Subject [INSERT]Insert blank values
Date
Msg-id 4a74ba520810240459r5ab6513j4deeccac11a3c3dd@mail.gmail.com
Whole thread Raw
Responses Re: [INSERT]Insert blank values  ("Leví Teodoro da Silva" <tlevisilva@gmail.com>)
List pgsql-novice
Hi guys,

I have a little problem.
I want to insert a blank on a varchar field. When i do the follow :
  INSERT INTO "Seller"("name", "id")VALUES ( null ,'1'); it works perfectly !!!
But if i try :
  INSERT INTO "Seller"("name", "id")VALUES ( '','1'); The postgres insert in my database the value '', and i dont want it.

The first way, is the only way for insert blank values !? Because it is not good for me, because i received a lot of fields from a form and i don't want to put null if the value is blank, and don't if it is not blank.


Regards,
Levi

pgsql-novice by date:

Previous
From: "Damian Carey"
Date:
Subject: Re: Simple Text Field Encryption
Next
From: "Leví Teodoro da Silva"
Date:
Subject: Re: [INSERT]Insert blank values