One of the best features in SQL are window functions. Dimitri Fontaine put it bluntly: There was SQL before window functions and SQL after window functions If you're lucky enough to be using any of these databases, then you can use window functions yourself: CUBRIDDB2FirebirdH2InformixMariaDBMySQLOraclePostgreSQLSQLiteSQL ServerSybase SQL AnywhereTeradata (source here) One of the most obvious … Continue reading The Difference Between ROW_NUMBER(), RANK(), and DENSE_RANK()
I'm pretty sure you've gotten it wrong in numerous ways, so far. And you probably won't get it right any time soon. So why waste your precious time on SQL tweaking, when you could be implementing business logic? Let me explain... It hasn't been until the recent SQL:2008 standard that what MySQL users know as … Continue reading Stop Trying to Emulate SQL OFFSET Pagination with Your In-House DB Framework!