I have been trying to find repeated number such as 1111, 22222, 55555, in my table. After some research, I found that this is said to work:
SELECT *
FROM tablename
WHERE columnname = REPLICATE(LEFT(columnname,1),LEN(columnname))
It did work, but I want to understand why it works. If anyone understands what this is doing please enlighten me.