search from comma separated values in sql server 1

search from comma separated values in sql server

WHERE tablename REGEXP "(^|,)@search(,|$)"

Here is what the above code is Doing:
1. It’s getting all the tables in the database.
2. It’s getting all the columns in the table.
3. It’s getting all the rows in the table.
4. It’s getting all the values in the row.
5. It’s printing the table name, column name, and value.

Similar Posts