Query Error: error: column does not exist

1k views Asked by At

I have created two tables and tried to join them, but it resulted in Query Error. What could be the problem?

Here is how I created tables

CREATE TABLE Customer
(
    "Ids" int,
    "Name" VARCHAR(100),
    "Gender" VARCHAR(100),
    "Age" int,
    "Phone" int
);

Insert Into Customer("Ids", "Name", "Gender", "Age", "Phone")
VALUES (1, 'Ruslan', 'Male', 14, 43214);
Insert Into Customer("Ids", "Name", "Gender", "Age", "Phone")
VALUES (2, 'Alex', 'Female', 19, 324323);
Insert Into Customer("Ids", "Name", "Gender", "Age", "Phone")


CREATE TABLE Product
(
    "Ids" int,
    "CustomerId" int,
    "ProductCode" VARCHAR(100),
    "Price" int
);

Insert Into Product("Ids", "CustomerId", "ProductCode", "Price")
VALUES (1, 1, 'Milk', 200);
Insert Into Product("Ids", "CustomerId", "ProductCode", "Price")
VALUES (2, 1, 'Butter', 105);
Insert Into Product("Ids", "CustomerId", "ProductCode", "Price")
VALUES (3, 1, 'Bread', 110);
Insert Into Product("Ids", "CustomerId", "ProductCode", "Price")

And Here is Query

SELECT Name, ProductCode FROM Customer 
INNER JOIN Product 
ON Customer.Name = Product.ProductCode
0

There are 0 answers