How to find column with all same repeating character
Actually there is REPLICATE() function:

WHERE &lt;column&gt; = REPLICATE('0',15)


Funny thing, it's actually using 17 characters, exactly the same as the '000000000000000' literal.

(Reading again the question, I suppose you don't want the above either because it has the 15 hard coded.)



The LIKE condition you have is not working as expected because the LIKE '[^0]' would be true only if the column had exactly 1 character. I think you need to check if it has only 0s or not:

WHERE &lt;column&gt; NOT LIKE '%[^0]%'


To check if it has only 0s or only spaces, this do (for CHAR and VARCHAR columns) and you don't even have to trim the column:

WHERE &lt;column&gt; = '' 
   OR &lt;column&gt; NOT LIKE '%[^0]%'