mysql 5.7 > CREATE TABLE `test` ( -> `id` int(11) unsigned NOT NULL AUTO_INCREMENT, -> `datetime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', -> `dateint` int(11) DEFAULT NULL, -> PRIMARY KEY (`id`) -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Query OK, 0 rows affected (0.39 sec) mysql 5.7 > mysql 5.7 > INSERT INTO `test` (`id`, `datetime`, `dateint`) -> VALUES -> (1,'2016-09-28 19:49:14',1475074414), -> (2,'2016-09-28 19:49:15',1475074415), -> (3,'2016-09-28 19:49:16',1475074416), -> (4,'2016-09-28 19:49:16',1475074416), -> (5,'2016-09-28 19:49:17',1475074417); Query OK, 5 rows affected (0.25 sec) Records: 5 Duplicates: 0 Warnings: 0 mysql 5.7 > SELECT * FROM `test` ORDER BY `datetime` LIMIT 3; +----+---------------------+------------+ | id | datetime | dateint | +----+---------------------+------------+ | 1 | 2016-09-28 19:49:14 | 1475074414 | | 2 | 2016-09-28 19:49:15 | 1475074415 | | 3 | 2016-09-28 19:49:16 | 1475074416 | +----+---------------------+------------+ 3 rows in set (0.12 sec) mysql 5.7 > SELECT * FROM `test` ORDER BY `datetime` LIMIT 3 OFFSET 3; +----+---------------------+------------+ | id | datetime | dateint | +----+---------------------+------------+ | 4 | 2016-09-28 19:49:16 | 1475074416 | | 5 | 2016-09-28 19:49:17 | 1475074417 | +----+---------------------+------------+ 2 rows in set (0.00 sec) mysql 5.7 > SELECT * FROM `test` ORDER BY `datetime` LIMIT 3 OFFSET 2; +----+---------------------+------------+ | id | datetime | dateint | +----+---------------------+------------+ | 3 | 2016-09-28 19:49:16 | 1475074416 | | 4 | 2016-09-28 19:49:16 | 1475074416 | | 5 | 2016-09-28 19:49:17 | 1475074417 | +----+---------------------+------------+ 3 rows in set (0.00 sec) mysql 5.7 > SHOW VARIABLES LIKE "%VERSION%"; +-------------------------+---------------------------------------+ | Variable_name | Value | +-------------------------+---------------------------------------+ | innodb_version | 5.7.16 | | protocol_version | 10 | | slave_type_conversions | | | tls_version | TLSv1,TLSv1.1 | | version | 5.7.16 | | version_comment | Source distribution PULL: 2016-SEP-07 | | version_compile_machine | x86_64 | | version_compile_os | Win64 | +-------------------------+---------------------------------------+ mysql 5.6 > CREATE TABLE `test` ( -> `id` int(11) unsigned NOT NULL AUTO_INCREMENT, -> `datetime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', -> `dateint` int(11) DEFAULT NULL, -> PRIMARY KEY (`id`) -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Query OK, 0 rows affected (0.46 sec) mysql 5.6 > mysql 5.6 > INSERT INTO `test` (`id`, `datetime`, `dateint`) -> VALUES -> (1,'2016-09-28 19:49:14',1475074414), -> (2,'2016-09-28 19:49:15',1475074415), -> (3,'2016-09-28 19:49:16',1475074416), -> (4,'2016-09-28 19:49:16',1475074416), -> (5,'2016-09-28 19:49:17',1475074417); Query OK, 5 rows affected (0.05 sec) Records: 5 Duplicates: 0 Warnings: 0 mysql 5.6 > SELECT * FROM `test` ORDER BY `datetime` LIMIT 3; +----+---------------------+------------+ | id | datetime | dateint | +----+---------------------+------------+ | 1 | 2016-09-28 19:49:14 | 1475074414 | | 2 | 2016-09-28 19:49:15 | 1475074415 | | 4 | 2016-09-28 19:49:16 | 1475074416 | +----+---------------------+------------+ 3 rows in set (0.03 sec) mysql 5.6 > SELECT * FROM `test` ORDER BY `datetime` LIMIT 3 OFFSET 3; +----+---------------------+------------+ | id | datetime | dateint | +----+---------------------+------------+ | 4 | 2016-09-28 19:49:16 | 1475074416 | | 5 | 2016-09-28 19:49:17 | 1475074417 | +----+---------------------+------------+ 2 rows in set (0.00 sec) mysql 5.6 > SHOW VARIABLES LIKE "%VERSION%"; +-------------------------+---------------------------------------+ | Variable_name | Value | +-------------------------+---------------------------------------+ | innodb_version | 5.6.34 | | protocol_version | 10 | | slave_type_conversions | | | version | 5.6.34 | | version_comment | Source distribution PULL: 2016-SEP-07 | | version_compile_machine | x86_64 | | version_compile_os | Win64 | +-------------------------+---------------------------------------+ 7 rows in set (0.09 sec) C:\dbs>c:\dbs\5.0\bin\mysql -uroot --port=3500 --prompt="mysql 5.0 > " Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.0.97-Win X64 Source distribution Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql 5.0 > CREATE DATABASE w; Query OK, 1 row affected (0.04 sec) mysql 5.0 > USE w Database changed mysql 5.0 > CREATE TABLE `test` ( -> `id` int(11) unsigned NOT NULL AUTO_INCREMENT, -> `datetime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', -> `dateint` int(11) DEFAULT NULL, -> PRIMARY KEY (`id`) -> ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Query OK, 0 rows affected (0.56 sec) mysql 5.0 > mysql 5.0 > INSERT INTO `test` (`id`, `datetime`, `dateint`) -> VALUES -> (1,'2016-09-28 19:49:14',1475074414), -> (2,'2016-09-28 19:49:15',1475074415), -> (3,'2016-09-28 19:49:16',1475074416), -> (4,'2016-09-28 19:49:16',1475074416), -> (5,'2016-09-28 19:49:17',1475074417); Query OK, 5 rows affected (0.07 sec) Records: 5 Duplicates: 0 Warnings: 0 mysql 5.0 > SELECT * FROM `test` ORDER BY `datetime` LIMIT 3; +----+---------------------+------------+ | id | datetime | dateint | +----+---------------------+------------+ | 1 | 2016-09-28 19:49:14 | 1475074414 | | 2 | 2016-09-28 19:49:15 | 1475074415 | | 3 | 2016-09-28 19:49:16 | 1475074416 | +----+---------------------+------------+ 3 rows in set (0.01 sec) mysql 5.0 > SELECT * FROM `test` ORDER BY `datetime` LIMIT 3 OFFSET 3; +----+---------------------+------------+ | id | datetime | dateint | +----+---------------------+------------+ | 4 | 2016-09-28 19:49:16 | 1475074416 | | 5 | 2016-09-28 19:49:17 | 1475074417 | +----+---------------------+------------+ 2 rows in set (0.00 sec)