I can't test if null = null, since I don't have the permissions to create data on the database i'm using.
My question is:
If I have a table with two rows:
Row 1: ItemID = 1, CollectionID = 1, Price = null
Row 2: ItemID = 2, CollectionID = 1, Price = null
And my query is as follows:
SELECT CollectionID
FROM my_table TB
WHERE Price >= (SELECT avg(Price)
FROM my_table
WHERE TB.CollectionID = CollectionID);
Will collectionID 1 be displayed in the results?
In other words, we have null values for TB.CollectionID and for CollectionID.
Does TB.CollectionID = CollectionID ?