Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
this is my code:
SQL
CREATE TABLE Customers (
 CustomerID varchar(25) NULL,
  LastName varchar(20) NULL,
  FirstName varchar(35) NULL,
  EmailAddress varchar(35) NULL,
  Address varchar(35) NULL,
  City varchar(25) NULL,
  State varchar(15) NULL,
  ZIP varchar(5) NULL,
  Country varchar(20) NULL,
  HomePhone varchar(15) NULL,
  MobilePhone varchar (15) NULL,
  Fax int NULL,
  CouponCustomer varchar(5) Null,
);



SQL
INSERT INTO Customers (CustomerID, LastName, FirstName, EmailAddress, Address, City, State, ZIP, Country, Home Phone, Mobile Phone, Fax, Coupon Customer) VALUES ('1', 'Wacker', 'Roland', ‘Rwak@gmailz.com’, ‘123 10th Street’, ‘Chicago’, ‘IL’, ‘99999’, ‘USA’, ‘416598563’, ‘416598564’, ‘(123)555-0101’, ‘Yes’ );


What I have tried:

I tried removing single quotations and changing int by home phone and mobile phone to varchar
Posted
Updated 30-Apr-18 20:59pm
v3

1 solution

You should try without space in fields names:
SQL
...
HomePhone varchar(15) NULL,
MobilePhone varchar (15) NULL,
...
INSERT INTO Customers (CustomerID, LastName, FirstName, EmailAddress, Address, City, State, ZIP, Country, HomePhone, MobilePhone, Fax, Coupon Customer) VALUES ('1', 'Wacker', 'Roland', ‘Rwak@gmailz.com’, ‘123 10th Street’, ‘Chicago’, ‘IL’, ‘99999’, ‘USA’, ‘416598563’, ‘416598564’, ‘(123)555-0101’, ‘Yes’ );
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900