How can I search all columns of a table in SQL Server?
SELECT ... FROM yourtable WHERE 'val' IN (field1, field2, field3, field4, ...)
if you're looking for exact full-field matches. If you're looking for substring matches, you'll have to go about it the long way:
WHERE field1 LIKE '%val%' or field2 LIKE '%val%' etc....
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With