Hello all,
I have a query which simply won't yield the result I want. I'm currently running on RedHat Linux 7.2 and MySQL version 3.23.45.
I have two tables:
attributekey
ID int(2)
NAME varchar(30)
productattribute
ID char(30),
ATTRIBUTEID int(2)
ATTRIBUTEVALUE varchar(30)
attribute key has 2 records:
1, Color
2, Width
3, Height
productattribute has 1 record:
A123, 1, RED
I want to create a query which will compare the productattribute.ATTRIBUTEID to attributekey.ID and list out attributekey.ID and attributekey.NAME which does not match.
If I execute this query:
"select attributekey.ID, attributekey.NAME from attributekey, productattribute where productattribute.ATTRIBUTEID <> attributekey.ID && productattribute.ID = 'A123'";
This will list out all 3 rows from attributekey when it should only list 2. I hope this is understandable :-).
TIA,
Allen.