sql server 2008 r2 - SQL Like statement is ordering results -


can please explain why simple sql statement cause results ordered column being 'liked'...

select * organisation company_name '%marce%' 

the above cause results ordered company name...

select * organisation 

will show results in index / id order.

order not guaranteed without explicitly using order by clause. it's arbitrary. there exist index on field, responsible 'natural' ordering of results, shouldn't relied upon.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -