string - SQL Check if a text contains a word -


i have text,

'me , against world' // false 'can have email address'  // true 'this an'  // true 'an' //true 

i want check whether word an inside string.

how check if text contains specific word in sql? can't add full-text catalog. otherwies could

select * table contains(text, 'an') 

here's 1 approach.

declare @table_name table (    column_name varchar(50) );  insert @table_name (column_name)   values ('me , against world')        , ('can have email address')        , ('this an') ;  select column_name   @table_name  ' ' + column_name + ' ' '% %' ; 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -