mysql - MS sql limit statment without order by and without top -
mysql - MS sql limit statment without order by and without top -
i've orm layer can communicates several dbs, mysql,oracle,ms sql , i'am usign pagging in applications, didn't know can results pages straightfully query, updating orm layer fit 3 dbs mentioned.
in mysql select * mytable limit 5,5
in oracle select * ( select * mytable t rownum < 100 ) wehre rownum > 10
in ms sql cant find way of order by
in query
i apologize syntax errors in queries, memory.
my question is, there way rid of order by
, paging capabilities ms sql
please re-think doing here. no matter database engine you're using, makes absolutely no sense seek rid of order by
when want utilize paging.
rows in relational databases don't have fixed order, need specify order by
clause if want receive rows in order. if don't specify order by
clause, database engine homecoming rows in random order. order looks sensible (like, ordered primary key) , if run same query more 1 time, order might same.
but in reality, random, , can't rely on "pseudo-order" making sense or beingness same on each query. paging without specifying order makes absolutely no sense.
mysql sql-server oracle orm
Comments
Post a Comment