sql server - SQL Like operator return null -


when use like operator on column string type, return 0 result there data matches criteria.

even interesting 'ga' return 0 shown in example below.

create table #temppersons (     firstname varchar(255) );  insert #temppersons (firstname) values ('anne daugaard') insert #temppersons (firstname) values ('jenne neergaard') insert #temppersons (firstname) values ('mark daugaard') insert #temppersons (firstname) values ('hans daugaard') insert #temppersons (firstname) values ('alle daugaard') insert #temppersons (firstname) values ('kent daugaard') insert #temppersons (firstname) values ('mavi gilbeert')  select * #temppersons  firstname '%ga%'  if object_id(n'tempdb..#temppersons', n'u') not null    drop table #temppersons; 

no result when firstname 'ga', when firstname 'gaa' or 'daugaa' there hits.

is 'ga' special?


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -