Order by :Error during order by in my sql

NishaGangwish

New Member
i try to join two table,\[code\]SELECT E . * , D . * FROM `basicincident` ELEFT JOIN incident D ON E.`INC_KEY` = D.`INC_KEY` WHERE E.`STATE` = "MD"AND SUBSTRING( E.INC_DATE , -4 ) = "2009"LIMIT 0 , 10\[/code\]it produce a good result..,but while implement order by,it will takes longer time to produce result..,\[code\]SELECT E . * , D . *FROM `basicincident` E LEFT JOIN incident D ON E.`INC_KEY` = D.`INC_KEY` WHERE E.`STATE` = 'MD' AND SUBSTRING( E.INC_DATE , -4 ) = '2009' AND E.INC_KEY >"MD0100110520090000015011111" ORDER BY E.INC_KEY limit 0,2\[/code\]when using order by..,it will not working good..,what shall i do for that..,thanks in advances..,
 
Back
Top