StrangeCan you post table structure?TestDeclare @t table(i int primary key , n varchar(10) null)insert into @t values(1,'test')insert into @t values(2,'test1')insert into @t values(3,'testing')insert into @t values(4,'sqltesting')insert into @t values(5,'ttesting')insert into @t values(6,null)select count(*) from @t where n like 'test%'select count(i) from @t where n like 'test%' -- Count(PrimaryKey)select * from @t where n like 'test%'
I didnt see anything wrongMadhivananFailing to plan is Planning to fail