I would like to compare two columns in the same table. I want to be able to return all rows where the two columns have the same value.
I am looking for something like SELECT * FROM FOO WHERE C1 = C4
.
Therefore in the example below I would return only the first row:
C1 || C2 || C3 || C4
--------------------------
1 || a || b || 1
2 || a || b || 4
3 || b || d || 2
4 || b || d || 2
If it matters, I am using SQLite
(more specifically WebSQL
).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…