6
INSERT INTO public."LeadCustomer"(
    "CustomerID", "FirstName", "Surname", "BillingAddress", "Email")
    VALUES ("12", "Lola", "Smith", "24 Cashmere Lane, Lancashire, LA4 6QT", "lolasmith@gmail.com");

ERROR:  column "12" does not exist
LINE 3:  VALUES ("12", "Lola", "Smith", "24 Cashmere Lane, Lancashir...
                 ^
********** Error **********

ERROR: column "12" does not exist
SQL state: 42703
Character: 111
Jens
  • 67,715
  • 15
  • 98
  • 113
Dani Miller
  • 61
  • 1
  • 1
  • 2

1 Answers1

18

You're getting this error be PostgreSQL uses double quotes (") to signify system identifiers (such as tables, columns, etc.) while using single quotes (') to signify text.

You want your query to be:

INSERT INTO public."LeadCustomer"(
    "CustomerID", "FirstName", "Surname", "BillingAddress", "Email")
    VALUES ('12', 'Lola', 'Smith', '24 Cashmere Lane, Lancashire, LA4 6QT', 'lolasmith@gmail.com');
MasterOdin
  • 7,117
  • 1
  • 20
  • 35