Re: [GENERAL] 9.6.1: INSERT with PK as serial - Mailing list pgsql-general

From David Rowley
Subject Re: [GENERAL] 9.6.1: INSERT with PK as serial
Date
Msg-id CAKJS1f8o7_ExaHJYx_UZq=t4wRd_XZ0SUzLbWEjGMLD1ZYLtkA@mail.gmail.com
Whole thread Raw
In response to Re: [GENERAL] 9.6.1: INSERT with PK as serial  (Rich Shepard <rshepard@appl-ecosys.com>)
List pgsql-general
On 17 January 2017 at 13:30, Rich Shepard <rshepard@appl-ecosys.com> wrote:
> INSERT INTO companies
>
('comp_id','comp_name','addr1','addr2','city','comp_state','postcode','country','phone','fax','e_mail','url','industry','status','comment')
> VALUES
> (1,'AG Spray Inc.',' ','PO Box
>
12129','Salem','OR','97309-0129','USA','503-371-7907','888-273-0937','info@agsprayinc.com','','Chemicals','Opportunity',''),

single quotes are strings. double quotes may be used for identifiers.

In the column names list here you've mixed up the two.

--
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-general by date:

Previous
From: John R Pierce
Date:
Subject: Re: [GENERAL] 9.6.1: INSERT with PK as serial
Next
From: "David G. Johnston"
Date:
Subject: Re: [GENERAL] 9.6.1: INSERT with PK as serial