I'm looking at some SQL code which has a WHERE clause like this:
WHERE 'USD' = CCY
I asked the writer why he's putting the value on the left hand side, and he said it's best practice to do so, stemming from C++ where people could mistakenly assign the value instead of comparing equality by forgetting the second equals sign.
I've never seen this before.
What are your thoughts?