I assume that "better" here means less typing? If so, you can speed things up with Intellisense or a third-party tool that does the same, or if you have a large number of columns, then use your favorite scripting language (Perl, Python, PowerShell, whatever) to create WHERE for you. You can even use SQL itself:
select 'tn.' + quotename(name) + ' = 1 and ' from sys.columns where object_id = object_id('MyTable') and name like 'col%'
But remember that you spend much more time reading code than writing it, so the most important thing is that the meaning of the request should be as clear as possible, and your current request is already very clear.
source share