mirror of
https://github.com/MariaDB/server.git
synced 2025-01-28 01:34:17 +01:00
125cf485b1
commit 6b20342651
34863 lines
1,008 KiB
Text
34863 lines
1,008 KiB
Text
DROP TABLE IF EXISTS t1,t2,t3,t4,t5;
|
|
CREATE TABLE t1(c1 TINYINT UNSIGNED NOT NULL, c2 TINYINT NULL, c3 SMALLINT, c4 MEDIUMINT , c5 INT, c6 INTEGER, c7 BIGINT);
|
|
CREATE TABLE t2(c1 TINYINT UNSIGNED NOT NULL, c2 TINYINT NULL, c3 SMALLINT, c4 MEDIUMINT , c5 INT, c6 INTEGER, c7 BIGINT, PRIMARY KEY(c1,c6));
|
|
CREATE TABLE t3(c1 TINYINT UNSIGNED NOT NULL, c2 TINYINT NULL, c3 SMALLINT, c4 MEDIUMINT , c5 INT, c6 INTEGER, c7 BIGINT, index idx(c2,c7));
|
|
INSERT INTO t1 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t2 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t3 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t2 VALUES(108,-109,110,111,112,101,114),(108,-109,110,111,112,102,114),(102,-109,110,111,112,113,114),(103,-109,110,111,112,113,114);
|
|
INSERT INTO t3 VALUES(101,-102,103,104,105,106,101),(101,-102,103,104,105,106,102),(101,-103,103,104,105,106,107),(101,-104,103,104,105,106,107);
|
|
INSERT INTO t1 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t2 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t3 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t1 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t2 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t3 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t1 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t2 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t3 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t1 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t2 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t3 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t1 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t2 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t3 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t1 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
INSERT INTO t2 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
INSERT INTO t3 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
SELECT * FROM t1;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t1;
|
|
total_rows min_value max_value sum avg
|
|
10 0 122 652 65.2000
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t1;
|
|
total_rows min_value max_value sum avg
|
|
10 -123 124 -202 -22.4444
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t2;
|
|
total_rows min_value max_value sum avg
|
|
14 0 122 1073 76.6429
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t2;
|
|
total_rows min_value max_value sum avg
|
|
14 -123 124 -638 -49.0769
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t3;
|
|
total_rows min_value max_value sum avg
|
|
14 0 122 1056 75.4286
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t3;
|
|
total_rows min_value max_value sum avg
|
|
14 -123 124 -613 -47.1538
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
14 0 122
|
|
SELECT * FROM t2 WHERE c2 = 102;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 35
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 25
|
|
0 20
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
14 0 122
|
|
SELECT * FROM t2 WHERE c2 = 102;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 35
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 25
|
|
0 20
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
14 -123 124
|
|
SELECT * FROM t3 WHERE c1 = 108;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
14 -123 124
|
|
SELECT * FROM t3 WHERE c1 = 108;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT c2 FROM t3 GROUP BY c2;
|
|
c2
|
|
-102
|
|
-103
|
|
-104
|
|
-109
|
|
-116
|
|
-123
|
|
0
|
|
124
|
|
NULL
|
|
SELECT DISTINCT c2 FROM t3;
|
|
c2
|
|
-102
|
|
-103
|
|
-104
|
|
-109
|
|
-116
|
|
-123
|
|
0
|
|
124
|
|
NULL
|
|
SELECT c2,MIN(c7) FROM t3 GROUP BY c2;
|
|
c2 MIN(c7)
|
|
-102 101
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
124 26
|
|
NULL 106
|
|
CREATE TABLE t4(c1 TINYINT SIGNED NOT NULL AUTO_INCREMENT, c2 TINYINT UNSIGNED NULL, c3 TINYINT UNSIGNED NOT NULL, c4 SMALLINT , c5 MEDIUMINT, c6 INT, c7 INTEGER, c8 BIGINT, PRIMARY KEY(c1), UNIQUE INDEX idx(c2,c3));
|
|
CREATE TABLE t5(c1 TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, c2 TINYINT SIGNED NULL, c3 TINYINT SIGNED NOT NULL, c4 SMALLINT, c5 MEDIUMINT, c6 INT, c7 INTEGER, c8 BIGINT, PRIMARY KEY(c1,c2), UNIQUE INDEX(c3));
|
|
INSERT INTO t4 VALUES(-101,102,103,104,105,106,107,108),(-108,109,110,111,112,113,114,115);
|
|
INSERT INTO t5 VALUES(101,-102,-103,-104,105,106,107,108),(108,-109,-110,111,112,113,114,115);
|
|
INSERT INTO t4 VALUES(0,32,33,34,35,36,37,38);
|
|
INSERT INTO t5 VALUES(0,-32,-32,33,34,35,36,37);
|
|
INSERT INTO t4(c1,c3,c4) VALUES(NULL,104,LAST_INSERT_ID());
|
|
INSERT INTO t5(c1,c3,c4) VALUES(NULL,-104,LAST_INSERT_ID());
|
|
Warnings:
|
|
Warning 1364 Field 'c2' doesn't have a default value
|
|
INSERT INTO t4 VALUES('','',17,18,19,20,21,22);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t5 VALUES('','',-17,18,19,20,21,22);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
|
|
INSERT INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
|
|
INSERT INTO t4 VALUES(4,7,8,9,10,11,12,13);
|
|
INSERT INTO t5 VALUES(-1,-1,-1,8,9,10,11,12);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t4(c2,c3,c4,c5,c6,c7,c8) VALUES(101,102,104,105,106,107,108),(108,109,111,112,113,114,115),(115,116,118,119,120,121,122),(122,123,125,126,127,128,128);
|
|
INSERT INTO t5(c2,c3,c4,c5,c6,c7,c8) VALUES(-101,-102,104,105,106,107,108),(-108,-109,111,112,113,114,115),(-115,-116,118,119,120,121,122),(-122,-123,125,126,127,128,128);
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t4;
|
|
total_rows min_value max_value sum avg
|
|
11 -108 106 321 29.1818
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t5;
|
|
total_rows min_value max_value sum avg
|
|
11 101 116 1211 110.0909
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t4;
|
|
total_rows min_value max(c1)
|
|
11 -108 106
|
|
SELECT * FROM t4 WHERE c4 = 104;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
103 101 102 104 105 106 107 108
|
|
SELECT c1 FROM t4;
|
|
c1
|
|
-101
|
|
-108
|
|
1
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
2
|
|
3
|
|
4
|
|
SELECT c1 FROM t4 ORDER BY c1 DESC;
|
|
c1
|
|
106
|
|
105
|
|
104
|
|
103
|
|
102
|
|
4
|
|
3
|
|
2
|
|
1
|
|
-101
|
|
-108
|
|
SELECT * FROM t4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t4;
|
|
total_rows min_value max(c1)
|
|
11 -108 106
|
|
SELECT * FROM t4 WHERE c4 = 104;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
103 101 102 104 105 106 107 108
|
|
SELECT c1 FROM t4;
|
|
c1
|
|
-101
|
|
-108
|
|
1
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
2
|
|
3
|
|
4
|
|
SELECT c1 FROM t4 ORDER BY c1 DESC;
|
|
c1
|
|
106
|
|
105
|
|
104
|
|
103
|
|
102
|
|
4
|
|
3
|
|
2
|
|
1
|
|
-101
|
|
-108
|
|
SELECT * FROM t4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t5;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t5;
|
|
total_rows min_value max(c1)
|
|
11 101 116
|
|
SELECT * FROM t5 WHERE c5 = 112;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
114 -108 -109 111 112 113 114 115
|
|
SELECT c1 FROM t5;
|
|
c1
|
|
101
|
|
102
|
|
108
|
|
109
|
|
110
|
|
111
|
|
112
|
|
113
|
|
114
|
|
115
|
|
116
|
|
SELECT c1 FROM t5 ORDER BY c1 DESC;
|
|
c1
|
|
116
|
|
115
|
|
114
|
|
113
|
|
112
|
|
111
|
|
110
|
|
109
|
|
108
|
|
102
|
|
101
|
|
SELECT * FROM t5 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1=1 OR c2=109;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
SELECT c2 FROM t4 GROUP BY c2;
|
|
c2
|
|
0
|
|
101
|
|
102
|
|
108
|
|
109
|
|
115
|
|
122
|
|
32
|
|
7
|
|
NULL
|
|
SELECT DISTINCT c2 FROM t4;
|
|
c2
|
|
0
|
|
101
|
|
102
|
|
108
|
|
109
|
|
115
|
|
122
|
|
32
|
|
7
|
|
NULL
|
|
SELECT c2,MIN(c3) FROM t4 GROUP BY c2;
|
|
c2 MIN(c3)
|
|
0 0
|
|
101 102
|
|
102 103
|
|
108 109
|
|
109 110
|
|
115 116
|
|
122 123
|
|
32 33
|
|
7 8
|
|
NULL 104
|
|
INSERT INTO t2(c1) VALUES(NULL);
|
|
ERROR 23000: Column 'c1' cannot be null
|
|
INSERT INTO t3 VALUES(NULL,1,2,3,4,5,6);
|
|
ERROR 23000: Column 'c1' cannot be null
|
|
INSERT INTO t4(c3) VALUES(NULL);
|
|
ERROR 23000: Column 'c3' cannot be null
|
|
INSERT INTO t5(c3) VALUES(NULL);
|
|
ERROR 23000: Column 'c3' cannot be null
|
|
INSERT INTO t4(c1,c3) VALUES(-101,105) /*throws error as the row with c1=-101 exists */;
|
|
ERROR 23000: Duplicate entry '-101' for key 'PRIMARY'
|
|
INSERT INTO t2(c1,c6) VALUES(101,106) /*throws error as the row with c1=101,c6=106 exists */;
|
|
ERROR 23000: Duplicate entry '101-106' for key 'PRIMARY'
|
|
INSERT INTO t5(c1,c2,c3) VALUES(101,-102,4) /*throws error as the row with c1=101,c2=-102 exists */;
|
|
ERROR 23000: Duplicate entry '101--102' for key 'PRIMARY'
|
|
INSERT INTO t5(c3) VALUES(-103) /*throws error as the row with c3=-103 exists */;
|
|
ERROR 23000: Duplicate entry '-103' for key 'c3'
|
|
INSERT INTO t4(c2,c3) VALUES(102,103) /*throws error as the row with c2=102,c3=103 exists */;
|
|
ERROR 23000: Duplicate entry '102-103' for key 'idx'
|
|
CREATE TABLE t6(c1 TINYINT UNSIGNED NOT NULL, c2 TINYINT NULL, c3 SMALLINT, c4 MEDIUMINT , c5 INT, c6 INTEGER, c7 BIGINT);
|
|
INSERT INTO t6 SELECT * FROM t2 where c1 >= 109;
|
|
SELECT * FROM t6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
TRUNCATE TABLE t6;
|
|
INSERT INTO t6 SELECT * FROM t3 where c2 <= -116;
|
|
SELECT * FROM t6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
TRUNCATE TABLE t6;
|
|
CREATE TABLE t7(c1 TINYINT UNSIGNED NOT NULL PRIMARY KEY, c2 TINYINT NULL, c3 SMALLINT, c4 MEDIUMINT , c5 INT, c6 INTEGER, c7 BIGINT);
|
|
CREATE TABLE t8(c1 TINYINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 TINYINT NULL, c3 SMALLINT, c4 MEDIUMINT , c5 INT, c6 INTEGER, c7 BIGINT);
|
|
INSERT INTO t6 VALUES(1,-2,2,2,2,2,2),(1,-3,3,3,3,3,3);
|
|
INSERT INTO t7(c1) SELECT t6.c1 FROM t6 LIMIT 1;
|
|
SELECT * FROM t7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
INSERT INTO t8(c1) SELECT t6.c1 FROM t6 LIMIT 1;
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
INSERT INTO t7(c1) SELECT t6.c1 FROM t6 /* throws error as t6 contains duplicate rows for c1=1 */;
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
SELECT c1 FROM t7;
|
|
c1
|
|
1
|
|
INSERT INTO t8(c1) SELECT t6.c1 FROM t6 /* throws error as t6 contains duplicate rows for c1=1 */;
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
SELECT c1 FROM t8;
|
|
c1
|
|
1
|
|
TRUNCATE TABLE t6;
|
|
TRUNCATE TABLE t7;
|
|
INSERT INTO t6(c1) VALUES(0),(1),(2),(3),(3),(4),(4),(5);
|
|
INSERT INTO t7(c1) SELECT c1 FROM t6;
|
|
ERROR 23000: Duplicate entry '3' for key 'PRIMARY'
|
|
TRUNCATE TABLE t6;
|
|
INSERT INTO t6 VALUES(5,-1,1,1,1,1,1),(6,-2,2,2,2,2,2),(0,-4,4,4,4,4,4),(NULL,-5,5,5,5,5,5);
|
|
Warnings:
|
|
Warning 1048 Column 'c1' cannot be null
|
|
INSERT INTO t8 SELECT * FROM t6;
|
|
SELECT LAST_INSERT_ID() AS last_insert_id;
|
|
last_insert_id
|
|
7
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
5 -1 1 1 1 1 1
|
|
6 -2 2 2 2 2 2
|
|
7 -4 4 4 4 4 4
|
|
8 -5 5 5 5 5 5
|
|
TRUNCATE TABLE t8;
|
|
INSERT INTO t8(c2) SELECT c2 FROM t6 WHERE c1 >= 6;
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 -2 NULL NULL NULL NULL NULL
|
|
DROP TABLE t6,t7,t8;
|
|
INSERT INTO t2 SET c3=5,c4=6;
|
|
Warnings:
|
|
Warning 1364 Field 'c1' doesn't have a default value
|
|
Warning 1364 Field 'c6' doesn't have a default value
|
|
SET SQL_MODE=STRICT_ALL_TABLES;
|
|
INSERT INTO t2 SET c3=5,c4=6;
|
|
ERROR HY000: Field 'c1' doesn't have a default value
|
|
SET SQL_MODE='';
|
|
INSERT INTO t1 VALUES(0,-128,1,2,3,4,5),(255,127,6,7,8,9,10);
|
|
INSERT INTO t2 VALUES(0,-128,1,2,3,4,5),(255,127,6,7,8,9,10);
|
|
INSERT INTO t3 VALUES(0,-128,1,2,3,4,5),(255,127,6,7,8,9,10);
|
|
INSERT INTO t4 VALUES(-128,0,1,2,3,4,5,5),(127,255,6,7,8,9,10,10);
|
|
INSERT INTO t5 VALUES(0,-128,1,2,3,4,5,5),(255,127,6,7,8,9,10,10);
|
|
INSERT INTO t4(c2,c3) VALUES(31,32) /* tries to increment out of range */;
|
|
ERROR 22003: Out of range value for column 'c1' at row 1
|
|
INSERT INTO t5(c2,c3) VALUES(33,34) /* tries to increment out of range */;
|
|
ERROR 22003: Out of range value for column 'c1' at row 1
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
-128 0 1 2 3 4 5 5
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
127 255 6 7 8 9 10 10
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
INSERT INTO t1 VALUES(-255,-129,26,27,28,29,30),(256,128,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
INSERT INTO t2 VALUES(-255,-129,26,27,28,29,30),(256,128,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
INSERT INTO t3 VALUES(-255,-129,26,27,28,29,30),(256,128,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
19 0 255
|
|
SELECT * FROM t2 WHERE c2 = -128;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
255 34
|
|
255 9
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 34
|
|
255 9
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (0,255) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IN (0,255) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 255 AND c6 = 4 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 255 AND c6 = 4 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,255) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IN (0,255) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 255 AND c6 = 4 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 255 AND c6 = 4 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
19 0 255
|
|
SELECT * FROM t2 WHERE c2 = 127;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
255 34
|
|
255 9
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 34
|
|
255 9
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 = 255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 = 255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 = 255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 <> 255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > 255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= 255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 < 255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 < 255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <= 255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <= 255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <=> 255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (0,255) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IN (0,255) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 255 AND c6 = 4 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 255 AND c6 = 4 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 < 255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 < 255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 <= 255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 <=> 255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,255) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IN (0,255) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 255 AND c6 = 4 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 255 AND c6 = 4 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
19 0 255
|
|
SELECT * FROM t2 WHERE c2 = -129;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
255 34
|
|
255 9
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 34
|
|
255 9
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 256 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 256 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (-255,256) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,256) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 256 AND c6 = 29 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 256 AND c6 = 29 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 256 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 256 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (-255,256) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,256) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 256 AND c6 = 29 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 256 AND c6 = 29 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
19 0 255
|
|
SELECT * FROM t2 WHERE c2 = 128;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
255 34
|
|
255 9
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 34
|
|
255 9
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 256 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 256 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 256 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 256 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <> 256 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> 256 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > 256 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 256 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 256 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 256 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 256 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 < 256 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <= 256 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <= 256 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 256 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> 256 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 256 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 256 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (-255,256) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,256) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 256 AND c6 = 29 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 256 AND c6 = 29 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -128 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 256 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 <> 256 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 256 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 256 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 256 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 256 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 256 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 < 256 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 256 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 <= 256 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 256 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> 256 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 256 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 256 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (-255,256) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,256) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 256 AND c6 = 29 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 256 AND c6 = 29 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -128 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -128 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
18 -128 127
|
|
SELECT * FROM t3 WHERE c1 = 0;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 30
|
|
-128 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
127 10
|
|
127 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-128 30
|
|
-128 5
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
127 35
|
|
127 10
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 = -128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <> -128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> -128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 > -128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 > -128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 >= -128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 < -128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= -128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> -128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> -128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -128 AND 127 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -128 AND 127 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-128,127) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-128,127) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -128 AND c2 < 127 AND c7 = 5 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -128 AND c2 < 127 AND c7 = 5 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> -128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 <> -128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 > -128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 > -128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 >= -128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 >= -128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 < -128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= -128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> -128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> -128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -128 AND 127 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -128 AND 127 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-128,127) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 IN (-128,127) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -128 AND c2 < 127 AND c7 = 5 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -128 AND c2 < 127 AND c7 = 5 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
18 -128 127
|
|
SELECT * FROM t3 WHERE c1 = 255;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 30
|
|
-128 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
127 10
|
|
127 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-128 30
|
|
-128 5
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
127 35
|
|
127 10
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = 127 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = 127 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = 127 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 = 127 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 <> 127 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 <> 127 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > 127 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 127 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 127 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= 127 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 < 127 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 < 127 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= 127 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <= 127 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> 127 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <=> 127 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -128 AND 127 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -128 AND 127 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-128,127) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-128,127) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -128 AND c2 < 127 AND c7 = 5 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -128 AND c2 < 127 AND c7 = 5 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> 127 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 <> 127 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > 127 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 127 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 127 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 >= 127 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 < 127 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 < 127 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= 127 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 <= 127 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> 127 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 <=> 127 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -128 AND 127 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -128 AND 127 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-128,127) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 IN (-128,127) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -128 AND c2 < 127 AND c7 = 5 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -128 AND c2 < 127 AND c7 = 5 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
18 -128 127
|
|
SELECT * FROM t3 WHERE c1 = -255;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 30
|
|
-128 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
127 10
|
|
127 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-128 30
|
|
-128 5
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
127 35
|
|
127 10
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -129 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -129 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -129 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -129 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> -129 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> -129 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > -129 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 > -129 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -129 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -129 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 < -129 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -129 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -129 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -129 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -129 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -129 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -129 AND 128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -129 AND 128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-129,128) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-129,128) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -129 AND c2 < 128 AND c7 = 30 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -129 AND c2 < 128 AND c7 = 30 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> -129 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 <> -129 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > -129 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 > -129 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -129 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 >= -129 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 < -129 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -129 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -129 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -129 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -129 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -129 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -129 AND 128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -129 AND 128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-129,128) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-129,128) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -129 AND c2 < 128 AND c7 = 30 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -129 AND c2 < 128 AND c7 = 30 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
18 -128 127
|
|
SELECT * FROM t3 WHERE c1 = 256;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 30
|
|
-128 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
127 10
|
|
127 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-128 30
|
|
-128 5
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
127 35
|
|
127 10
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = 128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> 128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> 128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > 128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < 128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 < 128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= 128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <= 128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> 128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> 128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -129 AND 128 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -129 AND 128 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-129,128) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-129,128) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -129 AND c2 < 128 AND c7 = 30 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -129 AND c2 < 128 AND c7 = 30 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
255 127 6 7 8 9 10
|
|
255 127 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 1 2 3 4 5
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> 128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 <> 128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > 128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < 128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 < 128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= 128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 <= 128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> 128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> 128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -129 AND 128 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -129 AND 128 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-129,128) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-129,128) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -129 AND c2 < 128 AND c7 = 30 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -129 AND c2 < 128 AND c7 = 30 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
255 127 31 32 33 34 35
|
|
255 127 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -128 26 27 28 29 30
|
|
0 -128 1 2 3 4 5
|
|
DROP TABLE t1,t2,t3,t4,t5;
|
|
CREATE TABLE t1(c1 SMALLINT UNSIGNED NOT NULL, c2 SMALLINT NULL, c3 TINYINT, c4 MEDIUMINT , c5 INT, c6 INTEGER, c7 BIGINT);
|
|
CREATE TABLE t2(c1 SMALLINT UNSIGNED NOT NULL, c2 SMALLINT NULL, c3 TINYINT, c4 MEDIUMINT , c5 INT, c6 INTEGER, c7 BIGINT, PRIMARY KEY(c1,c6));
|
|
CREATE TABLE t3(c1 SMALLINT UNSIGNED NOT NULL, c2 SMALLINT NULL, c3 TINYINT, c4 MEDIUMINT , c5 INT, c6 INTEGER, c7 BIGINT, index idx(c2,c7));
|
|
INSERT INTO t1 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t2 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t3 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t2 VALUES(108,-109,110,111,112,101,114),(108,-109,110,111,112,102,114),(102,-109,110,111,112,113,114),(103,-109,110,111,112,113,114);
|
|
INSERT INTO t3 VALUES(101,-102,103,104,105,106,101),(101,-102,103,104,105,106,102),(101,-103,103,104,105,106,107),(101,-104,103,104,105,106,107);
|
|
INSERT INTO t1 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t2 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t3 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t1 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t2 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t3 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t1 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t2 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t3 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t1 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t2 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t3 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t1 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t2 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t3 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t1 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
INSERT INTO t2 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
INSERT INTO t3 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
SELECT * FROM t1;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t1;
|
|
total_rows min_value max_value sum avg
|
|
10 0 122 652 65.2000
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t1;
|
|
total_rows min_value max_value sum avg
|
|
10 -123 124 -202 -22.4444
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t2;
|
|
total_rows min_value max_value sum avg
|
|
14 0 122 1073 76.6429
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t2;
|
|
total_rows min_value max_value sum avg
|
|
14 -123 124 -638 -49.0769
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t3;
|
|
total_rows min_value max_value sum avg
|
|
14 0 122 1056 75.4286
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t3;
|
|
total_rows min_value max_value sum avg
|
|
14 -123 124 -613 -47.1538
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
14 0 122
|
|
SELECT * FROM t2 WHERE c2 = 102;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 35
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 25
|
|
0 20
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
14 0 122
|
|
SELECT * FROM t2 WHERE c2 = 102;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 35
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 25
|
|
0 20
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
14 -123 124
|
|
SELECT * FROM t3 WHERE c1 = 108;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
14 -123 124
|
|
SELECT * FROM t3 WHERE c1 = 108;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT c2 FROM t3 GROUP BY c2;
|
|
c2
|
|
-102
|
|
-103
|
|
-104
|
|
-109
|
|
-116
|
|
-123
|
|
0
|
|
124
|
|
NULL
|
|
SELECT DISTINCT c2 FROM t3;
|
|
c2
|
|
-102
|
|
-103
|
|
-104
|
|
-109
|
|
-116
|
|
-123
|
|
0
|
|
124
|
|
NULL
|
|
SELECT c2,MIN(c7) FROM t3 GROUP BY c2;
|
|
c2 MIN(c7)
|
|
-102 101
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
124 26
|
|
NULL 106
|
|
CREATE TABLE t4(c1 SMALLINT SIGNED NOT NULL AUTO_INCREMENT, c2 SMALLINT UNSIGNED NULL, c3 SMALLINT UNSIGNED NOT NULL, c4 TINYINT , c5 MEDIUMINT, c6 INT, c7 INTEGER, c8 BIGINT, PRIMARY KEY(c1), UNIQUE INDEX idx(c2,c3));
|
|
CREATE TABLE t5(c1 SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT, c2 SMALLINT SIGNED NULL, c3 SMALLINT SIGNED NOT NULL, c4 TINYINT, c5 MEDIUMINT, c6 INT, c7 INTEGER, c8 BIGINT, PRIMARY KEY(c1,c2), UNIQUE INDEX(c3));
|
|
INSERT INTO t4 VALUES(-101,102,103,104,105,106,107,108),(-108,109,110,111,112,113,114,115);
|
|
INSERT INTO t5 VALUES(101,-102,-103,-104,105,106,107,108),(108,-109,-110,111,112,113,114,115);
|
|
INSERT INTO t4 VALUES(0,32,33,34,35,36,37,38);
|
|
INSERT INTO t5 VALUES(0,-32,-32,33,34,35,36,37);
|
|
INSERT INTO t4(c1,c3,c4) VALUES(NULL,104,LAST_INSERT_ID());
|
|
INSERT INTO t5(c1,c3,c4) VALUES(NULL,-104,LAST_INSERT_ID());
|
|
Warnings:
|
|
Warning 1364 Field 'c2' doesn't have a default value
|
|
INSERT INTO t4 VALUES('','',17,18,19,20,21,22);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t5 VALUES('','',-17,18,19,20,21,22);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
|
|
INSERT INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
|
|
INSERT INTO t4 VALUES(4,7,8,9,10,11,12,13);
|
|
INSERT INTO t5 VALUES(-1,-1,-1,8,9,10,11,12);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t4(c2,c3,c4,c5,c6,c7,c8) VALUES(101,102,104,105,106,107,108),(108,109,111,112,113,114,115),(115,116,118,119,120,121,122),(122,123,125,126,127,128,128);
|
|
INSERT INTO t5(c2,c3,c4,c5,c6,c7,c8) VALUES(-101,-102,104,105,106,107,108),(-108,-109,111,112,113,114,115),(-115,-116,118,119,120,121,122),(-122,-123,125,126,127,128,128);
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t4;
|
|
total_rows min_value max_value sum avg
|
|
11 -108 106 321 29.1818
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t5;
|
|
total_rows min_value max_value sum avg
|
|
11 101 116 1211 110.0909
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t4;
|
|
total_rows min_value max(c1)
|
|
11 -108 106
|
|
SELECT * FROM t4 WHERE c4 = 104;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
103 101 102 104 105 106 107 108
|
|
SELECT c1 FROM t4;
|
|
c1
|
|
-101
|
|
-108
|
|
1
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
2
|
|
3
|
|
4
|
|
SELECT c1 FROM t4 ORDER BY c1 DESC;
|
|
c1
|
|
106
|
|
105
|
|
104
|
|
103
|
|
102
|
|
4
|
|
3
|
|
2
|
|
1
|
|
-101
|
|
-108
|
|
SELECT * FROM t4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t4;
|
|
total_rows min_value max(c1)
|
|
11 -108 106
|
|
SELECT * FROM t4 WHERE c4 = 104;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
103 101 102 104 105 106 107 108
|
|
SELECT c1 FROM t4;
|
|
c1
|
|
-101
|
|
-108
|
|
1
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
2
|
|
3
|
|
4
|
|
SELECT c1 FROM t4 ORDER BY c1 DESC;
|
|
c1
|
|
106
|
|
105
|
|
104
|
|
103
|
|
102
|
|
4
|
|
3
|
|
2
|
|
1
|
|
-101
|
|
-108
|
|
SELECT * FROM t4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t5;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t5;
|
|
total_rows min_value max(c1)
|
|
11 101 116
|
|
SELECT * FROM t5 WHERE c5 = 112;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
114 -108 -109 111 112 113 114 115
|
|
SELECT c1 FROM t5;
|
|
c1
|
|
101
|
|
102
|
|
108
|
|
109
|
|
110
|
|
111
|
|
112
|
|
113
|
|
114
|
|
115
|
|
116
|
|
SELECT c1 FROM t5 ORDER BY c1 DESC;
|
|
c1
|
|
116
|
|
115
|
|
114
|
|
113
|
|
112
|
|
111
|
|
110
|
|
109
|
|
108
|
|
102
|
|
101
|
|
SELECT * FROM t5 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1=1 OR c2=109;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
SELECT c2 FROM t4 GROUP BY c2;
|
|
c2
|
|
0
|
|
101
|
|
102
|
|
108
|
|
109
|
|
115
|
|
122
|
|
32
|
|
7
|
|
NULL
|
|
SELECT DISTINCT c2 FROM t4;
|
|
c2
|
|
0
|
|
101
|
|
102
|
|
108
|
|
109
|
|
115
|
|
122
|
|
32
|
|
7
|
|
NULL
|
|
SELECT c2,MIN(c3) FROM t4 GROUP BY c2;
|
|
c2 MIN(c3)
|
|
0 0
|
|
101 102
|
|
102 103
|
|
108 109
|
|
109 110
|
|
115 116
|
|
122 123
|
|
32 33
|
|
7 8
|
|
NULL 104
|
|
INSERT INTO t2(c1) VALUES(NULL);
|
|
ERROR 23000: Column 'c1' cannot be null
|
|
INSERT INTO t3 VALUES(NULL,1,2,3,4,5,6);
|
|
ERROR 23000: Column 'c1' cannot be null
|
|
INSERT INTO t4(c3) VALUES(NULL);
|
|
ERROR 23000: Column 'c3' cannot be null
|
|
INSERT INTO t5(c3) VALUES(NULL);
|
|
ERROR 23000: Column 'c3' cannot be null
|
|
INSERT INTO t4(c1,c3) VALUES(-101,105) /*throws error as the row with c1=-101 exists */;
|
|
ERROR 23000: Duplicate entry '-101' for key 'PRIMARY'
|
|
INSERT INTO t2(c1,c6) VALUES(101,106) /*throws error as the row with c1=101,c6=106 exists */;
|
|
ERROR 23000: Duplicate entry '101-106' for key 'PRIMARY'
|
|
INSERT INTO t5(c1,c2,c3) VALUES(101,-102,4) /*throws error as the row with c1=101,c2=-102 exists */;
|
|
ERROR 23000: Duplicate entry '101--102' for key 'PRIMARY'
|
|
INSERT INTO t5(c3) VALUES(-103) /*throws error as the row with c3=-103 exists */;
|
|
ERROR 23000: Duplicate entry '-103' for key 'c3'
|
|
INSERT INTO t4(c2,c3) VALUES(102,103) /*throws error as the row with c2=102,c3=103 exists */;
|
|
ERROR 23000: Duplicate entry '102-103' for key 'idx'
|
|
CREATE TABLE t6(c1 SMALLINT UNSIGNED NOT NULL, c2 SMALLINT NULL, c3 TINYINT, c4 MEDIUMINT , c5 INT, c6 INTEGER, c7 BIGINT);
|
|
INSERT INTO t6 SELECT * FROM t2 where c1 >= 109;
|
|
SELECT * FROM t6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
TRUNCATE TABLE t6;
|
|
INSERT INTO t6 SELECT * FROM t3 where c2 <= -116;
|
|
SELECT * FROM t6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
TRUNCATE TABLE t6;
|
|
CREATE TABLE t7(c1 SMALLINT UNSIGNED NOT NULL PRIMARY KEY, c2 SMALLINT NULL, c3 TINYINT, c4 MEDIUMINT , c5 INT, c6 INTEGER, c7 BIGINT);
|
|
CREATE TABLE t8(c1 SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 SMALLINT NULL, c3 TINYINT, c4 MEDIUMINT , c5 INT, c6 INTEGER, c7 BIGINT);
|
|
INSERT INTO t6 VALUES(1,-2,2,2,2,2,2),(1,-3,3,3,3,3,3);
|
|
INSERT INTO t7(c1) SELECT t6.c1 FROM t6 LIMIT 1;
|
|
SELECT * FROM t7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
INSERT INTO t8(c1) SELECT t6.c1 FROM t6 LIMIT 1;
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
INSERT INTO t7(c1) SELECT t6.c1 FROM t6 /* throws error as t6 contains duplicate rows for c1=1 */;
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
INSERT INTO t8(c1) SELECT t6.c1 FROM t6 /* throws error as t6 contains duplicate rows for c1=1 */;
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
TRUNCATE TABLE t6;
|
|
INSERT INTO t6 VALUES(5,-1,1,1,1,1,1),(6,-2,2,2,2,2,2),(0,-4,4,4,4,4,4),(NULL,-5,5,5,5,5,5);
|
|
Warnings:
|
|
Warning 1048 Column 'c1' cannot be null
|
|
INSERT INTO t8 SELECT * FROM t6;
|
|
SELECT LAST_INSERT_ID() AS last_insert_id;
|
|
last_insert_id
|
|
7
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
5 -1 1 1 1 1 1
|
|
6 -2 2 2 2 2 2
|
|
7 -4 4 4 4 4 4
|
|
8 -5 5 5 5 5 5
|
|
TRUNCATE TABLE t8;
|
|
INSERT INTO t8(c2) SELECT c2 FROM t6 WHERE c1 >= 6;
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 -2 NULL NULL NULL NULL NULL
|
|
DROP TABLE t6,t7,t8;
|
|
INSERT INTO t2 SET c3=5,c4=6;
|
|
Warnings:
|
|
Warning 1364 Field 'c1' doesn't have a default value
|
|
Warning 1364 Field 'c6' doesn't have a default value
|
|
SET SQL_MODE=STRICT_ALL_TABLES;
|
|
INSERT INTO t2 SET c3=5,c4=6;
|
|
ERROR HY000: Field 'c1' doesn't have a default value
|
|
SET SQL_MODE='';
|
|
INSERT INTO t1 VALUES(0,-32768,1,2,3,4,5),(255,-128,6,7,8,9,10),(65535,32767,11,12,13,14,15);
|
|
INSERT INTO t2 VALUES(0,-32768,1,2,3,4,5),(255,-128,6,7,8,9,10),(65535,32767,11,12,13,14,15);
|
|
INSERT INTO t3 VALUES(0,-32768,1,2,3,4,5),(255,-128,6,7,8,9,10),(65535,32767,11,12,13,14,15);
|
|
INSERT INTO t4 VALUES(-32768,0,1,2,3,4,5,5),(-128,255,6,7,8,9,10,10),(32767,65535,11,12,13,14,15,15);
|
|
INSERT INTO t5 VALUES(0,-32768,1,2,3,4,5,5),(255,-128,6,7,8,9,10,10),(65535,32767,11,12,13,14,15,15);
|
|
INSERT INTO t4(c2,c3) VALUES(31,32) /* tries to increment out of range */;
|
|
ERROR 22003: Out of range value for column 'c1' at row 1
|
|
INSERT INTO t5(c2,c3) VALUES(33,34) /* tries to increment out of range */;
|
|
ERROR 22003: Out of range value for column 'c1' at row 1
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
-128 255 6 7 8 9 10 10
|
|
-32768 0 1 2 3 4 5 5
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
32767 65535 11 12 13 14 15 15
|
|
4 7 8 9 10 11 12 13
|
|
INSERT INTO t1 VALUES(-255,-32769,26,27,28,29,30),(65536,32768,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
INSERT INTO t2 VALUES(-255,-32769,26,27,28,29,30),(65536,32768,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
INSERT INTO t3 VALUES(-255,-32769,26,27,28,29,30),(65536,32768,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
20 0 65535
|
|
SELECT * FROM t2 WHERE c2 = -32768;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
65535 34
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 34
|
|
65535 14
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 65535 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 65535 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (0,65535) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IN (0,65535) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 65535 AND c6 = 9 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 65535 AND c6 = 9 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 65535 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 65535 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,65535) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 IN (0,65535) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 65535 AND c6 = 9 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 65535 AND c6 = 9 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
20 0 65535
|
|
SELECT * FROM t2 WHERE c2 = 32767;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
65535 34
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 34
|
|
65535 14
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 65535 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 = 65535 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 = 65535 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 = 65535 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 <> 65535 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 <> 65535 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > 65535 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 65535 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 65535 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= 65535 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 < 65535 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 < 65535 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <= 65535 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <= 65535 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 65535 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <=> 65535 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 65535 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 65535 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (0,65535) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IN (0,65535) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 65535 AND c6 = 9 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 65535 AND c6 = 9 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 65535 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 <> 65535 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 65535 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 65535 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 65535 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 >= 65535 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 < 65535 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 < 65535 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 65535 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 <= 65535 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 65535 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 <=> 65535 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 65535 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 65535 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,65535) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 IN (0,65535) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 65535 AND c6 = 9 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 65535 AND c6 = 9 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
20 0 65535
|
|
SELECT * FROM t2 WHERE c2 = -32769;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
65535 34
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 34
|
|
65535 14
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 65536 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 65536 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (-255,65536) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,65536) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 65536 AND c6 = 29 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 65536 AND c6 = 29 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 65536 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 65536 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (-255,65536) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,65536) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 65536 AND c6 = 29 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 65536 AND c6 = 29 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
20 0 65535
|
|
SELECT * FROM t2 WHERE c2 = 32768;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
65535 34
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 34
|
|
65535 14
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 65536 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 65536 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 65536 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 65536 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <> 65536 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> 65536 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > 65536 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 65536 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 65536 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 65536 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 65536 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 < 65536 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <= 65536 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <= 65536 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 65536 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> 65536 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 65536 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 65536 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (-255,65536) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,65536) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 65536 AND c6 = 29 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 65536 AND c6 = 29 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -32768 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 65536 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 <> 65536 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 65536 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 65536 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 65536 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 65536 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 65536 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 < 65536 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 65536 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 <= 65536 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 65536 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> 65536 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 65536 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 65536 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (-255,65536) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,65536) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 65536 AND c6 = 29 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 65536 AND c6 = 29 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -32768 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -32768 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
19 -32768 32767
|
|
SELECT * FROM t3 WHERE c1 = 0;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 10
|
|
-32768 30
|
|
-32768 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
32767 15
|
|
32767 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-32768 30
|
|
-32768 5
|
|
-128 10
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
32767 35
|
|
32767 15
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 = -32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <> -32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> -32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 > -32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 > -32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 >= -32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 < -32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= -32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> -32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> -32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32768 AND 32767 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32768 AND 32767 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-32768,32767) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-32768,32767) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -32768 AND c2 < 32767 AND c7 = 10 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 >= -32768 AND c2 < 32767 AND c7 = 10 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> -32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 <> -32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 > -32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 > -32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 >= -32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= -32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 < -32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= -32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> -32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> -32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32768 AND 32767 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32768 AND 32767 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-32768,32767) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 IN (-32768,32767) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -32768 AND c2 < 32767 AND c7 = 10 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 >= -32768 AND c2 < 32767 AND c7 = 10 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
19 -32768 32767
|
|
SELECT * FROM t3 WHERE c1 = 65535;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 10
|
|
-32768 30
|
|
-32768 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
32767 15
|
|
32767 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-32768 30
|
|
-32768 5
|
|
-128 10
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
32767 35
|
|
32767 15
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = 32767 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = 32767 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = 32767 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 = 32767 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 <> 32767 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 <> 32767 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > 32767 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 32767 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 32767 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= 32767 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 < 32767 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 < 32767 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= 32767 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <= 32767 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> 32767 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <=> 32767 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32768 AND 32767 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32768 AND 32767 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-32768,32767) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-32768,32767) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -32768 AND c2 < 32767 AND c7 = 10 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 >= -32768 AND c2 < 32767 AND c7 = 10 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> 32767 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 <> 32767 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > 32767 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 32767 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 32767 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= 32767 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 < 32767 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 < 32767 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= 32767 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 <= 32767 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> 32767 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 <=> 32767 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32768 AND 32767 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32768 AND 32767 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-32768,32767) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 IN (-32768,32767) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -32768 AND c2 < 32767 AND c7 = 10 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 >= -32768 AND c2 < 32767 AND c7 = 10 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -128 6 7 8 9 10
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
19 -32768 32767
|
|
SELECT * FROM t3 WHERE c1 = -255;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 10
|
|
-32768 30
|
|
-32768 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
32767 15
|
|
32767 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-32768 30
|
|
-32768 5
|
|
-128 10
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
32767 35
|
|
32767 15
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -32769 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -32769 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -32769 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -32769 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> -32769 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> -32769 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > -32769 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 > -32769 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -32769 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -32769 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 < -32769 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -32769 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -32769 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -32769 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -32769 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -32769 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32769 AND 32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32769 AND 32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-32769,32768) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-32769,32768) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -32769 AND c2 < 32768 AND c7 = 30 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -32769 AND c2 < 32768 AND c7 = 30 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> -32769 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 <> -32769 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > -32769 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 > -32769 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -32769 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= -32769 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 < -32769 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -32769 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -32769 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -32769 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -32769 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -32769 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32769 AND 32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32769 AND 32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-32769,32768) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-32769,32768) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -32769 AND c2 < 32768 AND c7 = 30 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -32769 AND c2 < 32768 AND c7 = 30 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -128 6 7 8 9 10
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
19 -32768 32767
|
|
SELECT * FROM t3 WHERE c1 = 65536;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 10
|
|
-32768 30
|
|
-32768 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
32767 15
|
|
32767 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-32768 30
|
|
-32768 5
|
|
-128 10
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
32767 35
|
|
32767 15
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = 32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> 32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> 32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > 32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < 32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 < 32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= 32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <= 32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> 32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> 32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32769 AND 32768 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32769 AND 32768 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-32769,32768) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-32769,32768) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -32769 AND c2 < 32768 AND c7 = 30 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -32769 AND c2 < 32768 AND c7 = 30 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
65535 32767 11 12 13 14 15
|
|
65535 32767 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 1 2 3 4 5
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> 32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 <> 32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > 32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < 32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 < 32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= 32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 <= 32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> 32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> 32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32769 AND 32768 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -32769 AND 32768 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-32769,32768) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-32769,32768) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -32769 AND c2 < 32768 AND c7 = 30 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -32769 AND c2 < 32768 AND c7 = 30 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
255 -128 6 7 8 9 10
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
65535 32767 31 32 33 34 35
|
|
65535 32767 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -32768 26 27 28 29 30
|
|
0 -32768 1 2 3 4 5
|
|
DROP TABLE t1,t2,t3,t4,t5;
|
|
CREATE TABLE t1(c1 MEDIUMINT UNSIGNED NOT NULL, c2 MEDIUMINT NULL, c3 TINYINT, c4 SMALLINT , c5 INT, c6 INTEGER, c7 BIGINT);
|
|
CREATE TABLE t2(c1 MEDIUMINT UNSIGNED NOT NULL, c2 MEDIUMINT NULL, c3 TINYINT, c4 SMALLINT , c5 INT, c6 INTEGER, c7 BIGINT, PRIMARY KEY(c1,c6));
|
|
CREATE TABLE t3(c1 MEDIUMINT UNSIGNED NOT NULL, c2 MEDIUMINT NULL, c3 TINYINT, c4 SMALLINT , c5 INT, c6 INTEGER, c7 BIGINT, index idx(c2,c7));
|
|
INSERT INTO t1 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t2 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t3 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t2 VALUES(108,-109,110,111,112,101,114),(108,-109,110,111,112,102,114),(102,-109,110,111,112,113,114),(103,-109,110,111,112,113,114);
|
|
INSERT INTO t3 VALUES(101,-102,103,104,105,106,101),(101,-102,103,104,105,106,102),(101,-103,103,104,105,106,107),(101,-104,103,104,105,106,107);
|
|
INSERT INTO t1 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t2 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t3 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t1 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t2 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t3 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t1 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t2 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t3 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t1 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t2 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t3 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t1 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t2 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t3 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t1 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
INSERT INTO t2 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
INSERT INTO t3 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
SELECT * FROM t1;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t1;
|
|
total_rows min_value max_value sum avg
|
|
10 0 122 652 65.2000
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t1;
|
|
total_rows min_value max_value sum avg
|
|
10 -123 124 -202 -22.4444
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t2;
|
|
total_rows min_value max_value sum avg
|
|
14 0 122 1073 76.6429
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t2;
|
|
total_rows min_value max_value sum avg
|
|
14 -123 124 -638 -49.0769
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t3;
|
|
total_rows min_value max_value sum avg
|
|
14 0 122 1056 75.4286
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t3;
|
|
total_rows min_value max_value sum avg
|
|
14 -123 124 -613 -47.1538
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
14 0 122
|
|
SELECT * FROM t2 WHERE c2 = 102;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 35
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 25
|
|
0 20
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
14 0 122
|
|
SELECT * FROM t2 WHERE c2 = 102;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 35
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 25
|
|
0 20
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
14 -123 124
|
|
SELECT * FROM t3 WHERE c1 = 108;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
14 -123 124
|
|
SELECT * FROM t3 WHERE c1 = 108;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT c2 FROM t3 GROUP BY c2;
|
|
c2
|
|
-102
|
|
-103
|
|
-104
|
|
-109
|
|
-116
|
|
-123
|
|
0
|
|
124
|
|
NULL
|
|
SELECT DISTINCT c2 FROM t3;
|
|
c2
|
|
-102
|
|
-103
|
|
-104
|
|
-109
|
|
-116
|
|
-123
|
|
0
|
|
124
|
|
NULL
|
|
SELECT c2,MIN(c7) FROM t3 GROUP BY c2;
|
|
c2 MIN(c7)
|
|
-102 101
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
124 26
|
|
NULL 106
|
|
CREATE TABLE t4(c1 MEDIUMINT SIGNED NOT NULL AUTO_INCREMENT, c2 MEDIUMINT UNSIGNED NULL, c3 MEDIUMINT UNSIGNED NOT NULL, c4 TINYINT , c5 SMALLINT, c6 INT, c7 INTEGER, c8 BIGINT, PRIMARY KEY(c1), UNIQUE INDEX idx(c2,c3));
|
|
CREATE TABLE t5(c1 MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT, c2 MEDIUMINT SIGNED NULL, c3 MEDIUMINT SIGNED NOT NULL, c4 TINYINT, c5 SMALLINT, c6 INT, c7 INTEGER, c8 BIGINT, PRIMARY KEY(c1,c2), UNIQUE INDEX(c3));
|
|
INSERT INTO t4 VALUES(-101,102,103,104,105,106,107,108),(-108,109,110,111,112,113,114,115);
|
|
INSERT INTO t5 VALUES(101,-102,-103,-104,105,106,107,108),(108,-109,-110,111,112,113,114,115);
|
|
INSERT INTO t4 VALUES(0,32,33,34,35,36,37,38);
|
|
INSERT INTO t5 VALUES(0,-32,-32,33,34,35,36,37);
|
|
INSERT INTO t4(c1,c3,c4) VALUES(NULL,104,LAST_INSERT_ID());
|
|
INSERT INTO t5(c1,c3,c4) VALUES(NULL,-104,LAST_INSERT_ID());
|
|
Warnings:
|
|
Warning 1364 Field 'c2' doesn't have a default value
|
|
INSERT INTO t4 VALUES('','',17,18,19,20,21,22);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t5 VALUES('','',-17,18,19,20,21,22);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
|
|
INSERT INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
|
|
INSERT INTO t4 VALUES(4,7,8,9,10,11,12,13);
|
|
INSERT INTO t5 VALUES(-1,-1,-1,8,9,10,11,12);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t4(c2,c3,c4,c5,c6,c7,c8) VALUES(101,102,104,105,106,107,108),(108,109,111,112,113,114,115),(115,116,118,119,120,121,122),(122,123,125,126,127,128,128);
|
|
INSERT INTO t5(c2,c3,c4,c5,c6,c7,c8) VALUES(-101,-102,104,105,106,107,108),(-108,-109,111,112,113,114,115),(-115,-116,118,119,120,121,122),(-122,-123,125,126,127,128,128);
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t4;
|
|
total_rows min_value max_value sum avg
|
|
11 -108 106 321 29.1818
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t5;
|
|
total_rows min_value max_value sum avg
|
|
11 101 116 1211 110.0909
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t4;
|
|
total_rows min_value max(c1)
|
|
11 -108 106
|
|
SELECT * FROM t4 WHERE c4 = 104;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
103 101 102 104 105 106 107 108
|
|
SELECT c1 FROM t4;
|
|
c1
|
|
-101
|
|
-108
|
|
1
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
2
|
|
3
|
|
4
|
|
SELECT c1 FROM t4 ORDER BY c1 DESC;
|
|
c1
|
|
106
|
|
105
|
|
104
|
|
103
|
|
102
|
|
4
|
|
3
|
|
2
|
|
1
|
|
-101
|
|
-108
|
|
SELECT * FROM t4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t4;
|
|
total_rows min_value max(c1)
|
|
11 -108 106
|
|
SELECT * FROM t4 WHERE c4 = 104;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
103 101 102 104 105 106 107 108
|
|
SELECT c1 FROM t4;
|
|
c1
|
|
-101
|
|
-108
|
|
1
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
2
|
|
3
|
|
4
|
|
SELECT c1 FROM t4 ORDER BY c1 DESC;
|
|
c1
|
|
106
|
|
105
|
|
104
|
|
103
|
|
102
|
|
4
|
|
3
|
|
2
|
|
1
|
|
-101
|
|
-108
|
|
SELECT * FROM t4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t5;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t5;
|
|
total_rows min_value max(c1)
|
|
11 101 116
|
|
SELECT * FROM t5 WHERE c5 = 112;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
114 -108 -109 111 112 113 114 115
|
|
SELECT c1 FROM t5;
|
|
c1
|
|
101
|
|
102
|
|
108
|
|
109
|
|
110
|
|
111
|
|
112
|
|
113
|
|
114
|
|
115
|
|
116
|
|
SELECT c1 FROM t5 ORDER BY c1 DESC;
|
|
c1
|
|
116
|
|
115
|
|
114
|
|
113
|
|
112
|
|
111
|
|
110
|
|
109
|
|
108
|
|
102
|
|
101
|
|
SELECT * FROM t5 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1=1 OR c2=109;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
SELECT c2 FROM t4 GROUP BY c2;
|
|
c2
|
|
0
|
|
101
|
|
102
|
|
108
|
|
109
|
|
115
|
|
122
|
|
32
|
|
7
|
|
NULL
|
|
SELECT DISTINCT c2 FROM t4;
|
|
c2
|
|
0
|
|
101
|
|
102
|
|
108
|
|
109
|
|
115
|
|
122
|
|
32
|
|
7
|
|
NULL
|
|
SELECT c2,MIN(c3) FROM t4 GROUP BY c2;
|
|
c2 MIN(c3)
|
|
0 0
|
|
101 102
|
|
102 103
|
|
108 109
|
|
109 110
|
|
115 116
|
|
122 123
|
|
32 33
|
|
7 8
|
|
NULL 104
|
|
INSERT INTO t2(c1) VALUES(NULL);
|
|
ERROR 23000: Column 'c1' cannot be null
|
|
INSERT INTO t3 VALUES(NULL,1,2,3,4,5,6);
|
|
ERROR 23000: Column 'c1' cannot be null
|
|
INSERT INTO t4(c3) VALUES(NULL);
|
|
ERROR 23000: Column 'c3' cannot be null
|
|
INSERT INTO t5(c3) VALUES(NULL);
|
|
ERROR 23000: Column 'c3' cannot be null
|
|
INSERT INTO t4(c1,c3) VALUES(-101,105) /*throws error as the row with c1=-101 exists */;
|
|
ERROR 23000: Duplicate entry '-101' for key 'PRIMARY'
|
|
INSERT INTO t2(c1,c6) VALUES(101,106) /*throws error as the row with c1=101,c6=106 exists */;
|
|
ERROR 23000: Duplicate entry '101-106' for key 'PRIMARY'
|
|
INSERT INTO t5(c1,c2,c3) VALUES(101,-102,4) /*throws error as the row with c1=101,c2=-102 exists */;
|
|
ERROR 23000: Duplicate entry '101--102' for key 'PRIMARY'
|
|
INSERT INTO t5(c3) VALUES(-103) /*throws error as the row with c3=-103 exists */;
|
|
ERROR 23000: Duplicate entry '-103' for key 'c3'
|
|
INSERT INTO t4(c2,c3) VALUES(102,103) /*throws error as the row with c2=102,c3=103 exists */;
|
|
ERROR 23000: Duplicate entry '102-103' for key 'idx'
|
|
CREATE TABLE t6(c1 MEDIUMINT UNSIGNED NOT NULL, c2 MEDIUMINT NULL, c3 TINYINT, c4 SMALLINT , c5 INT, c6 INTEGER, c7 BIGINT);
|
|
INSERT INTO t6 SELECT * FROM t2 where c1 >= 109;
|
|
SELECT * FROM t6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
TRUNCATE TABLE t6;
|
|
INSERT INTO t6 SELECT * FROM t3 where c2 <= -116;
|
|
SELECT * FROM t6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
TRUNCATE TABLE t6;
|
|
CREATE TABLE t7(c1 MEDIUMINT UNSIGNED NOT NULL PRIMARY KEY, c2 MEDIUMINT NULL, c3 TINYINT, c4 SMALLINT , c5 INT, c6 INTEGER, c7 BIGINT);
|
|
CREATE TABLE t8(c1 MEDIUMINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 MEDIUMINT NULL, c3 TINYINT, c4 SMALLINT , c5 INT, c6 INTEGER, c7 BIGINT);
|
|
INSERT INTO t6 VALUES(1,-2,2,2,2,2,2),(1,-3,3,3,3,3,3);
|
|
INSERT INTO t7(c1) SELECT t6.c1 FROM t6 LIMIT 1;
|
|
SELECT * FROM t7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
INSERT INTO t8(c1) SELECT t6.c1 FROM t6 LIMIT 1;
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
INSERT INTO t7(c1) SELECT t6.c1 FROM t6 /* throws error as t6 contains duplicate rows for c1=1 */;
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
INSERT INTO t8(c1) SELECT t6.c1 FROM t6 /* throws error as t6 contains duplicate rows for c1=1 */;
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
TRUNCATE TABLE t6;
|
|
INSERT INTO t6 VALUES(5,-1,1,1,1,1,1),(6,-2,2,2,2,2,2),(0,-4,4,4,4,4,4),(NULL,-5,5,5,5,5,5);
|
|
Warnings:
|
|
Warning 1048 Column 'c1' cannot be null
|
|
INSERT INTO t8 SELECT * FROM t6;
|
|
SELECT LAST_INSERT_ID() AS last_insert_id;
|
|
last_insert_id
|
|
7
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
5 -1 1 1 1 1 1
|
|
6 -2 2 2 2 2 2
|
|
7 -4 4 4 4 4 4
|
|
8 -5 5 5 5 5 5
|
|
TRUNCATE TABLE t8;
|
|
INSERT INTO t8(c2) SELECT c2 FROM t6 WHERE c1 >= 6;
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 -2 NULL NULL NULL NULL NULL
|
|
DROP TABLE t6,t7,t8;
|
|
INSERT INTO t2 SET c3=5,c4=6;
|
|
Warnings:
|
|
Warning 1364 Field 'c1' doesn't have a default value
|
|
Warning 1364 Field 'c6' doesn't have a default value
|
|
SET SQL_MODE=STRICT_ALL_TABLES;
|
|
INSERT INTO t2 SET c3=5,c4=6;
|
|
ERROR HY000: Field 'c1' doesn't have a default value
|
|
SET SQL_MODE='';
|
|
INSERT INTO t1 VALUES(0,-8388608,1,2,3,4,5),(255,-32768,6,7,8,9,10),(65535,-128,11,12,13,14,15),(16777215,8388607,16,17,18,19,20);
|
|
INSERT INTO t2 VALUES(0,-8388608,1,2,3,4,5),(255,-32768,6,7,8,9,10),(65535,-128,11,12,13,14,15),(16777215,8388607,16,17,18,19,20);
|
|
INSERT INTO t3 VALUES(0,-8388608,1,2,3,4,5),(255,-32768,6,7,8,9,10),(65535,-128,11,12,13,14,15),(16777215,8388607,16,17,18,19,20);
|
|
INSERT INTO t4 VALUES(-8388608,0,1,2,3,4,5,5),(-32768,255,6,7,8,9,10,10),(-128,65535,11,12,13,14,15,15),(8388607,16777215,16,17,18,19,20,20);
|
|
INSERT INTO t5 VALUES(0,-8388608,1,2,3,4,5,5),(255,-32768,6,7,8,9,10,10),(65535,-128,11,12,13,14,15,15),(16777215,8388607,16,17,18,19,20,20);
|
|
INSERT INTO t4(c2,c3) VALUES(31,32) /* tries to increment out of range */;
|
|
ERROR 22003: Out of range value for column 'c1' at row 1
|
|
INSERT INTO t5(c2,c3) VALUES(33,34) /* tries to increment out of range */;
|
|
ERROR 22003: Out of range value for column 'c1' at row 1
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
-128 65535 11 12 13 14 15 15
|
|
-32768 255 6 7 8 9 10 10
|
|
-8388608 0 1 2 3 4 5 5
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
8388607 16777215 16 17 18 19 20 20
|
|
INSERT INTO t1 VALUES(-255,-8388609,26,27,28,29,30),(16777216,8388608,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
INSERT INTO t2 VALUES(-255,-8388609,26,27,28,29,30),(16777216,8388608,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
INSERT INTO t3 VALUES(-255,-8388609,26,27,28,29,30),(16777216,8388608,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
21 0 16777215
|
|
SELECT * FROM t2 WHERE c2 = -8388608;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
16777215 34
|
|
255 9
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 34
|
|
16777215 19
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 16777215 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 16777215 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (0,16777215) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IN (0,16777215) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 16777215 AND c6 = 9 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 16777215 AND c6 = 9 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 16777215 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 16777215 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,16777215) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 IN (0,16777215) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 16777215 AND c6 = 9 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 16777215 AND c6 = 9 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
21 0 16777215
|
|
SELECT * FROM t2 WHERE c2 = 8388607;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
16777215 34
|
|
255 9
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 34
|
|
16777215 19
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 16777215 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 = 16777215 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 = 16777215 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 = 16777215 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 <> 16777215 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 <> 16777215 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > 16777215 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 16777215 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 16777215 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= 16777215 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 < 16777215 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 < 16777215 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <= 16777215 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <= 16777215 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 16777215 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <=> 16777215 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 16777215 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 16777215 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (0,16777215) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IN (0,16777215) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 16777215 AND c6 = 9 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 16777215 AND c6 = 9 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 16777215 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 <> 16777215 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 16777215 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 16777215 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 16777215 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 >= 16777215 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 < 16777215 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 < 16777215 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 16777215 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 <= 16777215 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 16777215 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 <=> 16777215 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 16777215 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 16777215 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,16777215) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 IN (0,16777215) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 16777215 AND c6 = 9 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 16777215 AND c6 = 9 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
21 0 16777215
|
|
SELECT * FROM t2 WHERE c2 = -8388609;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
16777215 34
|
|
255 9
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 34
|
|
16777215 19
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 16777216 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 16777216 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (-255,16777216) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,16777216) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 16777216 AND c6 = 29 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 16777216 AND c6 = 29 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 16777216 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 16777216 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (-255,16777216) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,16777216) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 16777216 AND c6 = 29 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 16777216 AND c6 = 29 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
21 0 16777215
|
|
SELECT * FROM t2 WHERE c2 = 8388608;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
16777215 34
|
|
255 9
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 34
|
|
16777215 19
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 16777216 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 16777216 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 16777216 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 16777216 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <> 16777216 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> 16777216 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > 16777216 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 16777216 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 16777216 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 16777216 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 16777216 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 < 16777216 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <= 16777216 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <= 16777216 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 16777216 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> 16777216 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 16777216 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 16777216 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (-255,16777216) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,16777216) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 16777216 AND c6 = 29 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 16777216 AND c6 = 29 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 16777216 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 <> 16777216 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 16777216 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 16777216 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 16777216 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 16777216 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 16777216 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 < 16777216 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 16777216 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 <= 16777216 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 16777216 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> 16777216 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 16777216 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 16777216 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (-255,16777216) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,16777216) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 16777216 AND c6 = 29 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 16777216 AND c6 = 29 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -8388608 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -8388608 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
20 -8388608 8388607
|
|
SELECT * FROM t3 WHERE c1 = 0;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 15
|
|
-32768 10
|
|
-8388608 30
|
|
-8388608 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
8388607 20
|
|
8388607 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-8388608 30
|
|
-8388608 5
|
|
-32768 10
|
|
-128 15
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
8388607 35
|
|
8388607 20
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 = -8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <> -8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> -8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 > -8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 > -8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= -8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 < -8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= -8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> -8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> -8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388608 AND 8388607 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388608 AND 8388607 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-8388608,8388607) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-8388608,8388607) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -8388608 AND c2 < 8388607 AND c7 = 15 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= -8388608 AND c2 < 8388607 AND c7 = 15 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> -8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 <> -8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 > -8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 > -8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= -8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= -8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 < -8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= -8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> -8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> -8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388608 AND 8388607 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388608 AND 8388607 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-8388608,8388607) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IN (-8388608,8388607) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -8388608 AND c2 < 8388607 AND c7 = 15 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= -8388608 AND c2 < 8388607 AND c7 = 15 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
20 -8388608 8388607
|
|
SELECT * FROM t3 WHERE c1 = 16777215;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 15
|
|
-32768 10
|
|
-8388608 30
|
|
-8388608 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
8388607 20
|
|
8388607 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-8388608 30
|
|
-8388608 5
|
|
-32768 10
|
|
-128 15
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
8388607 35
|
|
8388607 20
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = 8388607 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = 8388607 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = 8388607 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 = 8388607 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 <> 8388607 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 <> 8388607 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > 8388607 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 8388607 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 8388607 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= 8388607 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 < 8388607 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 < 8388607 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= 8388607 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <= 8388607 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> 8388607 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <=> 8388607 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388608 AND 8388607 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388608 AND 8388607 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-8388608,8388607) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-8388608,8388607) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -8388608 AND c2 < 8388607 AND c7 = 15 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= -8388608 AND c2 < 8388607 AND c7 = 15 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> 8388607 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 <> 8388607 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > 8388607 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 8388607 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 8388607 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= 8388607 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 < 8388607 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 < 8388607 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= 8388607 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 <= 8388607 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> 8388607 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 <=> 8388607 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388608 AND 8388607 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388608 AND 8388607 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-8388608,8388607) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IN (-8388608,8388607) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -8388608 AND c2 < 8388607 AND c7 = 15 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= -8388608 AND c2 < 8388607 AND c7 = 15 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -128 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
20 -8388608 8388607
|
|
SELECT * FROM t3 WHERE c1 = -255;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 15
|
|
-32768 10
|
|
-8388608 30
|
|
-8388608 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
8388607 20
|
|
8388607 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-8388608 30
|
|
-8388608 5
|
|
-32768 10
|
|
-128 15
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
8388607 35
|
|
8388607 20
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -8388609 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -8388609 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -8388609 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -8388609 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> -8388609 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> -8388609 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > -8388609 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 > -8388609 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -8388609 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -8388609 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 < -8388609 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -8388609 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -8388609 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -8388609 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -8388609 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -8388609 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388609 AND 8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388609 AND 8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-8388609,8388608) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-8388609,8388608) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -8388609 AND c2 < 8388608 AND c7 = 30 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -8388609 AND c2 < 8388608 AND c7 = 30 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> -8388609 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 <> -8388609 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > -8388609 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 > -8388609 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -8388609 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= -8388609 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 < -8388609 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -8388609 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -8388609 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -8388609 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -8388609 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -8388609 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388609 AND 8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388609 AND 8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-8388609,8388608) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-8388609,8388608) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -8388609 AND c2 < 8388608 AND c7 = 30 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -8388609 AND c2 < 8388608 AND c7 = 30 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
20 -8388608 8388607
|
|
SELECT * FROM t3 WHERE c1 = 16777216;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 15
|
|
-32768 10
|
|
-8388608 30
|
|
-8388608 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
8388607 20
|
|
8388607 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-8388608 30
|
|
-8388608 5
|
|
-32768 10
|
|
-128 15
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
8388607 35
|
|
8388607 20
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = 8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> 8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> 8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > 8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < 8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 < 8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= 8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <= 8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> 8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> 8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388609 AND 8388608 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388609 AND 8388608 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-8388609,8388608) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-8388609,8388608) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -8388609 AND c2 < 8388608 AND c7 = 30 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -8388609 AND c2 < 8388608 AND c7 = 30 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
16777215 8388607 16 17 18 19 20
|
|
16777215 8388607 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 1 2 3 4 5
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> 8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 <> 8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > 8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < 8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 < 8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= 8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 <= 8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> 8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> 8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388609 AND 8388608 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -8388609 AND 8388608 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-8388609,8388608) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-8388609,8388608) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -8388609 AND c2 < 8388608 AND c7 = 30 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -8388609 AND c2 < 8388608 AND c7 = 30 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
255 -32768 6 7 8 9 10
|
|
65535 -128 11 12 13 14 15
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
16777215 8388607 31 32 33 34 35
|
|
16777215 8388607 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -8388608 26 27 28 29 30
|
|
0 -8388608 1 2 3 4 5
|
|
DROP TABLE t1,t2,t3,t4,t5;
|
|
CREATE TABLE t1(c1 INT UNSIGNED NOT NULL, c2 INT NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INTEGER, c7 BIGINT);
|
|
CREATE TABLE t2(c1 INT UNSIGNED NOT NULL, c2 INT NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INTEGER, c7 BIGINT, PRIMARY KEY(c1,c6));
|
|
CREATE TABLE t3(c1 INT UNSIGNED NOT NULL, c2 INT NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INTEGER, c7 BIGINT, index idx(c2,c7));
|
|
INSERT INTO t1 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t2 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t3 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t2 VALUES(108,-109,110,111,112,101,114),(108,-109,110,111,112,102,114),(102,-109,110,111,112,113,114),(103,-109,110,111,112,113,114);
|
|
INSERT INTO t3 VALUES(101,-102,103,104,105,106,101),(101,-102,103,104,105,106,102),(101,-103,103,104,105,106,107),(101,-104,103,104,105,106,107);
|
|
INSERT INTO t1 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t2 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t3 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t1 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t2 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t3 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t1 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t2 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t3 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t1 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t2 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t3 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t1 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t2 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t3 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t1 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
INSERT INTO t2 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
INSERT INTO t3 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
SELECT * FROM t1;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t1;
|
|
total_rows min_value max_value sum avg
|
|
10 0 122 652 65.2000
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t1;
|
|
total_rows min_value max_value sum avg
|
|
10 -123 124 -202 -22.4444
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t2;
|
|
total_rows min_value max_value sum avg
|
|
14 0 122 1073 76.6429
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t2;
|
|
total_rows min_value max_value sum avg
|
|
14 -123 124 -638 -49.0769
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t3;
|
|
total_rows min_value max_value sum avg
|
|
14 0 122 1056 75.4286
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t3;
|
|
total_rows min_value max_value sum avg
|
|
14 -123 124 -613 -47.1538
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
14 0 122
|
|
SELECT * FROM t2 WHERE c2 = 102;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 35
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 25
|
|
0 20
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
14 0 122
|
|
SELECT * FROM t2 WHERE c2 = 102;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 35
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 25
|
|
0 20
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
14 -123 124
|
|
SELECT * FROM t3 WHERE c1 = 108;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
14 -123 124
|
|
SELECT * FROM t3 WHERE c1 = 108;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT c2 FROM t3 GROUP BY c2;
|
|
c2
|
|
-102
|
|
-103
|
|
-104
|
|
-109
|
|
-116
|
|
-123
|
|
0
|
|
124
|
|
NULL
|
|
SELECT DISTINCT c2 FROM t3;
|
|
c2
|
|
-102
|
|
-103
|
|
-104
|
|
-109
|
|
-116
|
|
-123
|
|
0
|
|
124
|
|
NULL
|
|
SELECT c2,MIN(c7) FROM t3 GROUP BY c2;
|
|
c2 MIN(c7)
|
|
-102 101
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
124 26
|
|
NULL 106
|
|
CREATE TABLE t4(c1 INT SIGNED NOT NULL AUTO_INCREMENT, c2 INT UNSIGNED NULL, c3 INT UNSIGNED NOT NULL, c4 TINYINT , c5 SMALLINT, c6 MEDIUMINT, c7 INTEGER, c8 BIGINT, PRIMARY KEY(c1), UNIQUE INDEX idx(c2,c3));
|
|
CREATE TABLE t5(c1 INT UNSIGNED NOT NULL AUTO_INCREMENT, c2 INT SIGNED NULL, c3 INT SIGNED NOT NULL, c4 TINYINT, c5 SMALLINT, c6 MEDIUMINT, c7 INTEGER, c8 BIGINT, PRIMARY KEY(c1,c2), UNIQUE INDEX(c3));
|
|
INSERT INTO t4 VALUES(-101,102,103,104,105,106,107,108),(-108,109,110,111,112,113,114,115);
|
|
INSERT INTO t5 VALUES(101,-102,-103,-104,105,106,107,108),(108,-109,-110,111,112,113,114,115);
|
|
INSERT INTO t4 VALUES(0,32,33,34,35,36,37,38);
|
|
INSERT INTO t5 VALUES(0,-32,-32,33,34,35,36,37);
|
|
INSERT INTO t4(c1,c3,c4) VALUES(NULL,104,LAST_INSERT_ID());
|
|
INSERT INTO t5(c1,c3,c4) VALUES(NULL,-104,LAST_INSERT_ID());
|
|
Warnings:
|
|
Warning 1364 Field 'c2' doesn't have a default value
|
|
INSERT INTO t4 VALUES('','',17,18,19,20,21,22);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t5 VALUES('','',-17,18,19,20,21,22);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
|
|
INSERT INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
|
|
INSERT INTO t4 VALUES(4,7,8,9,10,11,12,13);
|
|
INSERT INTO t5 VALUES(-1,-1,-1,8,9,10,11,12);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t4(c2,c3,c4,c5,c6,c7,c8) VALUES(101,102,104,105,106,107,108),(108,109,111,112,113,114,115),(115,116,118,119,120,121,122),(122,123,125,126,127,128,128);
|
|
INSERT INTO t5(c2,c3,c4,c5,c6,c7,c8) VALUES(-101,-102,104,105,106,107,108),(-108,-109,111,112,113,114,115),(-115,-116,118,119,120,121,122),(-122,-123,125,126,127,128,128);
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t4;
|
|
total_rows min_value max_value sum avg
|
|
11 -108 106 321 29.1818
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t5;
|
|
total_rows min_value max_value sum avg
|
|
11 101 116 1211 110.0909
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t4;
|
|
total_rows min_value max(c1)
|
|
11 -108 106
|
|
SELECT * FROM t4 WHERE c4 = 104;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
103 101 102 104 105 106 107 108
|
|
SELECT c1 FROM t4;
|
|
c1
|
|
-101
|
|
-108
|
|
1
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
2
|
|
3
|
|
4
|
|
SELECT c1 FROM t4 ORDER BY c1 DESC;
|
|
c1
|
|
106
|
|
105
|
|
104
|
|
103
|
|
102
|
|
4
|
|
3
|
|
2
|
|
1
|
|
-101
|
|
-108
|
|
SELECT * FROM t4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t4;
|
|
total_rows min_value max(c1)
|
|
11 -108 106
|
|
SELECT * FROM t4 WHERE c4 = 104;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
103 101 102 104 105 106 107 108
|
|
SELECT c1 FROM t4;
|
|
c1
|
|
-101
|
|
-108
|
|
1
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
2
|
|
3
|
|
4
|
|
SELECT c1 FROM t4 ORDER BY c1 DESC;
|
|
c1
|
|
106
|
|
105
|
|
104
|
|
103
|
|
102
|
|
4
|
|
3
|
|
2
|
|
1
|
|
-101
|
|
-108
|
|
SELECT * FROM t4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t5;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t5;
|
|
total_rows min_value max(c1)
|
|
11 101 116
|
|
SELECT * FROM t5 WHERE c5 = 112;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
114 -108 -109 111 112 113 114 115
|
|
SELECT c1 FROM t5;
|
|
c1
|
|
101
|
|
102
|
|
108
|
|
109
|
|
110
|
|
111
|
|
112
|
|
113
|
|
114
|
|
115
|
|
116
|
|
SELECT c1 FROM t5 ORDER BY c1 DESC;
|
|
c1
|
|
116
|
|
115
|
|
114
|
|
113
|
|
112
|
|
111
|
|
110
|
|
109
|
|
108
|
|
102
|
|
101
|
|
SELECT * FROM t5 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1=1 OR c2=109;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
SELECT c2 FROM t4 GROUP BY c2;
|
|
c2
|
|
0
|
|
101
|
|
102
|
|
108
|
|
109
|
|
115
|
|
122
|
|
32
|
|
7
|
|
NULL
|
|
SELECT DISTINCT c2 FROM t4;
|
|
c2
|
|
0
|
|
101
|
|
102
|
|
108
|
|
109
|
|
115
|
|
122
|
|
32
|
|
7
|
|
NULL
|
|
SELECT c2,MIN(c3) FROM t4 GROUP BY c2;
|
|
c2 MIN(c3)
|
|
0 0
|
|
101 102
|
|
102 103
|
|
108 109
|
|
109 110
|
|
115 116
|
|
122 123
|
|
32 33
|
|
7 8
|
|
NULL 104
|
|
INSERT INTO t2(c1) VALUES(NULL);
|
|
ERROR 23000: Column 'c1' cannot be null
|
|
INSERT INTO t3 VALUES(NULL,1,2,3,4,5,6);
|
|
ERROR 23000: Column 'c1' cannot be null
|
|
INSERT INTO t4(c3) VALUES(NULL);
|
|
ERROR 23000: Column 'c3' cannot be null
|
|
INSERT INTO t5(c3) VALUES(NULL);
|
|
ERROR 23000: Column 'c3' cannot be null
|
|
INSERT INTO t4(c1,c3) VALUES(-101,105) /*throws error as the row with c1=-101 exists */;
|
|
ERROR 23000: Duplicate entry '-101' for key 'PRIMARY'
|
|
INSERT INTO t2(c1,c6) VALUES(101,106) /*throws error as the row with c1=101,c6=106 exists */;
|
|
ERROR 23000: Duplicate entry '101-106' for key 'PRIMARY'
|
|
INSERT INTO t5(c1,c2,c3) VALUES(101,-102,4) /*throws error as the row with c1=101,c2=-102 exists */;
|
|
ERROR 23000: Duplicate entry '101--102' for key 'PRIMARY'
|
|
INSERT INTO t5(c3) VALUES(-103) /*throws error as the row with c3=-103 exists */;
|
|
ERROR 23000: Duplicate entry '-103' for key 'c3'
|
|
INSERT INTO t4(c2,c3) VALUES(102,103) /*throws error as the row with c2=102,c3=103 exists */;
|
|
ERROR 23000: Duplicate entry '102-103' for key 'idx'
|
|
CREATE TABLE t6(c1 INT UNSIGNED NOT NULL, c2 INT NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INTEGER, c7 BIGINT);
|
|
INSERT INTO t6 SELECT * FROM t2 where c1 >= 109;
|
|
SELECT * FROM t6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
TRUNCATE TABLE t6;
|
|
INSERT INTO t6 SELECT * FROM t3 where c2 <= -116;
|
|
SELECT * FROM t6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
TRUNCATE TABLE t6;
|
|
CREATE TABLE t7(c1 INT UNSIGNED NOT NULL PRIMARY KEY, c2 INT NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INTEGER, c7 BIGINT);
|
|
CREATE TABLE t8(c1 INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 INT NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INTEGER, c7 BIGINT);
|
|
INSERT INTO t6 VALUES(1,-2,2,2,2,2,2),(1,-3,3,3,3,3,3);
|
|
INSERT INTO t7(c1) SELECT t6.c1 FROM t6 LIMIT 1;
|
|
SELECT * FROM t7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
INSERT INTO t8(c1) SELECT t6.c1 FROM t6 LIMIT 1;
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
INSERT INTO t7(c1) SELECT t6.c1 FROM t6 /* throws error as t6 contains duplicate rows for c1=1 */;
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
INSERT INTO t8(c1) SELECT t6.c1 FROM t6 /* throws error as t6 contains duplicate rows for c1=1 */;
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
TRUNCATE TABLE t6;
|
|
INSERT INTO t6 VALUES(5,-1,1,1,1,1,1),(6,-2,2,2,2,2,2),(0,-4,4,4,4,4,4),(NULL,-5,5,5,5,5,5);
|
|
Warnings:
|
|
Warning 1048 Column 'c1' cannot be null
|
|
INSERT INTO t8 SELECT * FROM t6;
|
|
SELECT LAST_INSERT_ID() AS last_insert_id;
|
|
last_insert_id
|
|
7
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
5 -1 1 1 1 1 1
|
|
6 -2 2 2 2 2 2
|
|
7 -4 4 4 4 4 4
|
|
8 -5 5 5 5 5 5
|
|
TRUNCATE TABLE t8;
|
|
INSERT INTO t8(c2) SELECT c2 FROM t6 WHERE c1 >= 6;
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 -2 NULL NULL NULL NULL NULL
|
|
DROP TABLE t6,t7,t8;
|
|
INSERT INTO t2 SET c3=5,c4=6;
|
|
Warnings:
|
|
Warning 1364 Field 'c1' doesn't have a default value
|
|
Warning 1364 Field 'c6' doesn't have a default value
|
|
SET SQL_MODE=STRICT_ALL_TABLES;
|
|
INSERT INTO t2 SET c3=5,c4=6;
|
|
ERROR HY000: Field 'c1' doesn't have a default value
|
|
SET SQL_MODE='';
|
|
INSERT INTO t1 VALUES(0,-2147483648,1,2,3,4,5),(255,-8388608,6,7,8,9,10),(65535,-32768,11,12,13,14,15),(16777215,-128,16,17,18,19,20),(4294967295,2147483647,21,22,23,24,25);
|
|
INSERT INTO t2 VALUES(0,-2147483648,1,2,3,4,5),(255,-8388608,6,7,8,9,10),(65535,-32768,11,12,13,14,15),(16777215,-128,16,17,18,19,20),(4294967295,2147483647,21,22,23,24,25);
|
|
INSERT INTO t3 VALUES(0,-2147483648,1,2,3,4,5),(255,-8388608,6,7,8,9,10),(65535,-32768,11,12,13,14,15),(16777215,-128,16,17,18,19,20),(4294967295,2147483647,21,22,23,24,25);
|
|
INSERT INTO t4 VALUES(-2147483648,0,1,2,3,4,5,5),(-8388608,255,6,7,8,9,10,10),(-32768,65535,11,12,13,14,15,15),(-128,16777215,16,17,18,19,20,20),(2147483647,4294967295,21,22,23,24,25,25);
|
|
INSERT INTO t5 VALUES(0,-2147483648,1,2,3,4,5,5),(255,-8388608,6,7,8,9,10,10),(65535,-32768,11,12,13,14,15,15),(16777215,-128,16,17,18,19,20,20),(4294967295,2147483647,21,22,23,24,25,25);
|
|
INSERT INTO t4(c2,c3) VALUES(31,32) /* tries to increment out of range */;
|
|
ERROR 22003: Out of range value for column 'c1' at row 1
|
|
INSERT INTO t5(c2,c3) VALUES(33,34) /* tries to increment out of range */;
|
|
ERROR 22003: Out of range value for column 'c1' at row 1
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
-128 16777215 16 17 18 19 20 20
|
|
-2147483648 0 1 2 3 4 5 5
|
|
-32768 65535 11 12 13 14 15 15
|
|
-8388608 255 6 7 8 9 10 10
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
2147483647 4294967295 21 22 23 24 25 25
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
INSERT INTO t1 VALUES(-255,-2147483649,26,27,28,29,30),(4294967296,2147483648,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
INSERT INTO t2 VALUES(-255,-2147483649,26,27,28,29,30),(4294967296,2147483648,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
INSERT INTO t3 VALUES(-255,-2147483649,26,27,28,29,30),(4294967296,2147483648,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
22 0 4294967295
|
|
SELECT * FROM t2 WHERE c2 = -2147483648;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
255 9
|
|
4294967295 24
|
|
4294967295 34
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 19
|
|
4294967295 34
|
|
4294967295 24
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
22 0 4294967295
|
|
SELECT * FROM t2 WHERE c2 = 2147483647;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
255 9
|
|
4294967295 24
|
|
4294967295 34
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 19
|
|
4294967295 34
|
|
4294967295 24
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 = 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 = 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 = 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <> 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 <> 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 < 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 < 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <= 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <= 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 <> 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 >= 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 < 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 < 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <= 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
22 0 4294967295
|
|
SELECT * FROM t2 WHERE c2 = -2147483649;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
255 9
|
|
4294967295 24
|
|
4294967295 34
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 19
|
|
4294967295 34
|
|
4294967295 24
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
22 0 4294967295
|
|
SELECT * FROM t2 WHERE c2 = 2147483648;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
255 9
|
|
4294967295 24
|
|
4294967295 34
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 19
|
|
4294967295 34
|
|
4294967295 24
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <> 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 < 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <= 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <= 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <> 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 < 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <= 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
21 -2147483648 2147483647
|
|
SELECT * FROM t3 WHERE c1 = 0;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 20
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-32768 15
|
|
-8388608 10
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
2147483647 25
|
|
2147483647 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-8388608 10
|
|
-32768 15
|
|
-128 20
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
2147483647 35
|
|
2147483647 25
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 = -2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <> -2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> -2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 > -2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 > -2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 < -2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= -2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> -2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 <> -2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 > -2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 > -2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 < -2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= -2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
21 -2147483648 2147483647
|
|
SELECT * FROM t3 WHERE c1 = 4294967295;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 20
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-32768 15
|
|
-8388608 10
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
2147483647 25
|
|
2147483647 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-8388608 10
|
|
-32768 15
|
|
-128 20
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
2147483647 35
|
|
2147483647 25
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 = 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 <> 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 <> 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 < 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 < 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <= 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 <> 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 >= 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 < 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 < 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 <= 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
21 -2147483648 2147483647
|
|
SELECT * FROM t3 WHERE c1 = -255;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 20
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-32768 15
|
|
-8388608 10
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
2147483647 25
|
|
2147483647 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-8388608 10
|
|
-32768 15
|
|
-128 20
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
2147483647 35
|
|
2147483647 25
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -2147483649 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -2147483649 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -2147483649 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -2147483649 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> -2147483649 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> -2147483649 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > -2147483649 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 > -2147483649 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 < -2147483649 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -2147483649 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -2147483649 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -2147483649 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483649 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483649 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> -2147483649 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 <> -2147483649 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > -2147483649 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 > -2147483649 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 < -2147483649 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -2147483649 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -2147483649 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -2147483649 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483649 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483649 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
21 -2147483648 2147483647
|
|
SELECT * FROM t3 WHERE c1 = 4294967296;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 20
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-32768 15
|
|
-8388608 10
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
2147483647 25
|
|
2147483647 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-8388608 10
|
|
-32768 15
|
|
-128 20
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
2147483647 35
|
|
2147483647 25
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 < 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <= 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 <> 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 < 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 <= 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
DROP TABLE t1,t2,t3,t4,t5;
|
|
CREATE TABLE t1(c1 INTEGER UNSIGNED NOT NULL, c2 INTEGER NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INT, c7 BIGINT);
|
|
CREATE TABLE t2(c1 INTEGER UNSIGNED NOT NULL, c2 INTEGER NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INT, c7 BIGINT, PRIMARY KEY(c1,c6));
|
|
CREATE TABLE t3(c1 INTEGER UNSIGNED NOT NULL, c2 INTEGER NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INT, c7 BIGINT, index idx(c2,c7));
|
|
INSERT INTO t1 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t2 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t3 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t2 VALUES(108,-109,110,111,112,101,114),(108,-109,110,111,112,102,114),(102,-109,110,111,112,113,114),(103,-109,110,111,112,113,114);
|
|
INSERT INTO t3 VALUES(101,-102,103,104,105,106,101),(101,-102,103,104,105,106,102),(101,-103,103,104,105,106,107),(101,-104,103,104,105,106,107);
|
|
INSERT INTO t1 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t2 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t3 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t1 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t2 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t3 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t1 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t2 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t3 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t1 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t2 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t3 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t1 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t2 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t3 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t1 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
INSERT INTO t2 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
INSERT INTO t3 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
SELECT * FROM t1;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t1;
|
|
total_rows min_value max_value sum avg
|
|
10 0 122 652 65.2000
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t1;
|
|
total_rows min_value max_value sum avg
|
|
10 -123 124 -202 -22.4444
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t2;
|
|
total_rows min_value max_value sum avg
|
|
14 0 122 1073 76.6429
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t2;
|
|
total_rows min_value max_value sum avg
|
|
14 -123 124 -638 -49.0769
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t3;
|
|
total_rows min_value max_value sum avg
|
|
14 0 122 1056 75.4286
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t3;
|
|
total_rows min_value max_value sum avg
|
|
14 -123 124 -613 -47.1538
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
14 0 122
|
|
SELECT * FROM t2 WHERE c2 = 102;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 35
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 25
|
|
0 20
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
14 0 122
|
|
SELECT * FROM t2 WHERE c2 = 102;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 35
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 25
|
|
0 20
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
14 -123 124
|
|
SELECT * FROM t3 WHERE c1 = 108;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
14 -123 124
|
|
SELECT * FROM t3 WHERE c1 = 108;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT c2 FROM t3 GROUP BY c2;
|
|
c2
|
|
-102
|
|
-103
|
|
-104
|
|
-109
|
|
-116
|
|
-123
|
|
0
|
|
124
|
|
NULL
|
|
SELECT DISTINCT c2 FROM t3;
|
|
c2
|
|
-102
|
|
-103
|
|
-104
|
|
-109
|
|
-116
|
|
-123
|
|
0
|
|
124
|
|
NULL
|
|
SELECT c2,MIN(c7) FROM t3 GROUP BY c2;
|
|
c2 MIN(c7)
|
|
-102 101
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
124 26
|
|
NULL 106
|
|
CREATE TABLE t4(c1 INTEGER SIGNED NOT NULL AUTO_INCREMENT, c2 INTEGER UNSIGNED NULL, c3 INTEGER UNSIGNED NOT NULL, c4 TINYINT , c5 SMALLINT, c6 MEDIUMINT, c7 INT, c8 BIGINT, PRIMARY KEY(c1), UNIQUE INDEX idx(c2,c3));
|
|
CREATE TABLE t5(c1 INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, c2 INTEGER SIGNED NULL, c3 INTEGER SIGNED NOT NULL, c4 TINYINT, c5 SMALLINT, c6 MEDIUMINT, c7 INT, c8 BIGINT, PRIMARY KEY(c1,c2), UNIQUE INDEX(c3));
|
|
INSERT INTO t4 VALUES(-101,102,103,104,105,106,107,108),(-108,109,110,111,112,113,114,115);
|
|
INSERT INTO t5 VALUES(101,-102,-103,-104,105,106,107,108),(108,-109,-110,111,112,113,114,115);
|
|
INSERT INTO t4 VALUES(0,32,33,34,35,36,37,38);
|
|
INSERT INTO t5 VALUES(0,-32,-32,33,34,35,36,37);
|
|
INSERT INTO t4(c1,c3,c4) VALUES(NULL,104,LAST_INSERT_ID());
|
|
INSERT INTO t5(c1,c3,c4) VALUES(NULL,-104,LAST_INSERT_ID());
|
|
Warnings:
|
|
Warning 1364 Field 'c2' doesn't have a default value
|
|
INSERT INTO t4 VALUES('','',17,18,19,20,21,22);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t5 VALUES('','',-17,18,19,20,21,22);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
|
|
INSERT INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
|
|
INSERT INTO t4 VALUES(4,7,8,9,10,11,12,13);
|
|
INSERT INTO t5 VALUES(-1,-1,-1,8,9,10,11,12);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t4(c2,c3,c4,c5,c6,c7,c8) VALUES(101,102,104,105,106,107,108),(108,109,111,112,113,114,115),(115,116,118,119,120,121,122),(122,123,125,126,127,128,128);
|
|
INSERT INTO t5(c2,c3,c4,c5,c6,c7,c8) VALUES(-101,-102,104,105,106,107,108),(-108,-109,111,112,113,114,115),(-115,-116,118,119,120,121,122),(-122,-123,125,126,127,128,128);
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t4;
|
|
total_rows min_value max_value sum avg
|
|
11 -108 106 321 29.1818
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t5;
|
|
total_rows min_value max_value sum avg
|
|
11 101 116 1211 110.0909
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t4;
|
|
total_rows min_value max(c1)
|
|
11 -108 106
|
|
SELECT * FROM t4 WHERE c4 = 104;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
103 101 102 104 105 106 107 108
|
|
SELECT c1 FROM t4;
|
|
c1
|
|
-101
|
|
-108
|
|
1
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
2
|
|
3
|
|
4
|
|
SELECT c1 FROM t4 ORDER BY c1 DESC;
|
|
c1
|
|
106
|
|
105
|
|
104
|
|
103
|
|
102
|
|
4
|
|
3
|
|
2
|
|
1
|
|
-101
|
|
-108
|
|
SELECT * FROM t4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t4;
|
|
total_rows min_value max(c1)
|
|
11 -108 106
|
|
SELECT * FROM t4 WHERE c4 = 104;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
103 101 102 104 105 106 107 108
|
|
SELECT c1 FROM t4;
|
|
c1
|
|
-101
|
|
-108
|
|
1
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
2
|
|
3
|
|
4
|
|
SELECT c1 FROM t4 ORDER BY c1 DESC;
|
|
c1
|
|
106
|
|
105
|
|
104
|
|
103
|
|
102
|
|
4
|
|
3
|
|
2
|
|
1
|
|
-101
|
|
-108
|
|
SELECT * FROM t4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t5;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t5;
|
|
total_rows min_value max(c1)
|
|
11 101 116
|
|
SELECT * FROM t5 WHERE c5 = 112;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
114 -108 -109 111 112 113 114 115
|
|
SELECT c1 FROM t5;
|
|
c1
|
|
101
|
|
102
|
|
108
|
|
109
|
|
110
|
|
111
|
|
112
|
|
113
|
|
114
|
|
115
|
|
116
|
|
SELECT c1 FROM t5 ORDER BY c1 DESC;
|
|
c1
|
|
116
|
|
115
|
|
114
|
|
113
|
|
112
|
|
111
|
|
110
|
|
109
|
|
108
|
|
102
|
|
101
|
|
SELECT * FROM t5 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1=1 OR c2=109;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
SELECT c2 FROM t4 GROUP BY c2;
|
|
c2
|
|
0
|
|
101
|
|
102
|
|
108
|
|
109
|
|
115
|
|
122
|
|
32
|
|
7
|
|
NULL
|
|
SELECT DISTINCT c2 FROM t4;
|
|
c2
|
|
0
|
|
101
|
|
102
|
|
108
|
|
109
|
|
115
|
|
122
|
|
32
|
|
7
|
|
NULL
|
|
SELECT c2,MIN(c3) FROM t4 GROUP BY c2;
|
|
c2 MIN(c3)
|
|
0 0
|
|
101 102
|
|
102 103
|
|
108 109
|
|
109 110
|
|
115 116
|
|
122 123
|
|
32 33
|
|
7 8
|
|
NULL 104
|
|
INSERT INTO t2(c1) VALUES(NULL);
|
|
ERROR 23000: Column 'c1' cannot be null
|
|
INSERT INTO t3 VALUES(NULL,1,2,3,4,5,6);
|
|
ERROR 23000: Column 'c1' cannot be null
|
|
INSERT INTO t4(c3) VALUES(NULL);
|
|
ERROR 23000: Column 'c3' cannot be null
|
|
INSERT INTO t5(c3) VALUES(NULL);
|
|
ERROR 23000: Column 'c3' cannot be null
|
|
INSERT INTO t4(c1,c3) VALUES(-101,105) /*throws error as the row with c1=-101 exists */;
|
|
ERROR 23000: Duplicate entry '-101' for key 'PRIMARY'
|
|
INSERT INTO t2(c1,c6) VALUES(101,106) /*throws error as the row with c1=101,c6=106 exists */;
|
|
ERROR 23000: Duplicate entry '101-106' for key 'PRIMARY'
|
|
INSERT INTO t5(c1,c2,c3) VALUES(101,-102,4) /*throws error as the row with c1=101,c2=-102 exists */;
|
|
ERROR 23000: Duplicate entry '101--102' for key 'PRIMARY'
|
|
INSERT INTO t5(c3) VALUES(-103) /*throws error as the row with c3=-103 exists */;
|
|
ERROR 23000: Duplicate entry '-103' for key 'c3'
|
|
INSERT INTO t4(c2,c3) VALUES(102,103) /*throws error as the row with c2=102,c3=103 exists */;
|
|
ERROR 23000: Duplicate entry '102-103' for key 'idx'
|
|
CREATE TABLE t6(c1 INTEGER UNSIGNED NOT NULL, c2 INTEGER NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INT, c7 BIGINT);
|
|
INSERT INTO t6 SELECT * FROM t2 where c1 >= 109;
|
|
SELECT * FROM t6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
TRUNCATE TABLE t6;
|
|
INSERT INTO t6 SELECT * FROM t3 where c2 <= -116;
|
|
SELECT * FROM t6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
TRUNCATE TABLE t6;
|
|
CREATE TABLE t7(c1 INTEGER UNSIGNED NOT NULL PRIMARY KEY, c2 INTEGER NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INT, c7 BIGINT);
|
|
CREATE TABLE t8(c1 INTEGER UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 INTEGER NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INT, c7 BIGINT);
|
|
INSERT INTO t6 VALUES(1,-2,2,2,2,2,2),(1,-3,3,3,3,3,3);
|
|
INSERT INTO t7(c1) SELECT t6.c1 FROM t6 LIMIT 1;
|
|
SELECT * FROM t7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
INSERT INTO t8(c1) SELECT t6.c1 FROM t6 LIMIT 1;
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
INSERT INTO t7(c1) SELECT t6.c1 FROM t6 /* throws error as t6 contains duplicate rows for c1=1 */;
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
INSERT INTO t8(c1) SELECT t6.c1 FROM t6 /* throws error as t6 contains duplicate rows for c1=1 */;
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
TRUNCATE TABLE t6;
|
|
INSERT INTO t6 VALUES(5,-1,1,1,1,1,1),(6,-2,2,2,2,2,2),(0,-4,4,4,4,4,4),(NULL,-5,5,5,5,5,5);
|
|
Warnings:
|
|
Warning 1048 Column 'c1' cannot be null
|
|
INSERT INTO t8 SELECT * FROM t6;
|
|
SELECT LAST_INSERT_ID() AS last_insert_id;
|
|
last_insert_id
|
|
7
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
5 -1 1 1 1 1 1
|
|
6 -2 2 2 2 2 2
|
|
7 -4 4 4 4 4 4
|
|
8 -5 5 5 5 5 5
|
|
TRUNCATE TABLE t8;
|
|
INSERT INTO t8(c2) SELECT c2 FROM t6 WHERE c1 >= 6;
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 -2 NULL NULL NULL NULL NULL
|
|
DROP TABLE t6,t7,t8;
|
|
INSERT INTO t2 SET c3=5,c4=6;
|
|
Warnings:
|
|
Warning 1364 Field 'c1' doesn't have a default value
|
|
Warning 1364 Field 'c6' doesn't have a default value
|
|
SET SQL_MODE=STRICT_ALL_TABLES;
|
|
INSERT INTO t2 SET c3=5,c4=6;
|
|
ERROR HY000: Field 'c1' doesn't have a default value
|
|
SET SQL_MODE='';
|
|
INSERT INTO t1 VALUES(0,-2147483648,1,2,3,4,5),(255,-8388608,6,7,8,9,10),(65535,-32768,11,12,13,14,15),(16777215,-128,16,17,18,19,20),(4294967295,2147483647,21,22,23,24,25);
|
|
INSERT INTO t2 VALUES(0,-2147483648,1,2,3,4,5),(255,-8388608,6,7,8,9,10),(65535,-32768,11,12,13,14,15),(16777215,-128,16,17,18,19,20),(4294967295,2147483647,21,22,23,24,25);
|
|
INSERT INTO t3 VALUES(0,-2147483648,1,2,3,4,5),(255,-8388608,6,7,8,9,10),(65535,-32768,11,12,13,14,15),(16777215,-128,16,17,18,19,20),(4294967295,2147483647,21,22,23,24,25);
|
|
INSERT INTO t4 VALUES(-2147483648,0,1,2,3,4,5,5),(-8388608,255,6,7,8,9,10,10),(-32768,65535,11,12,13,14,15,15),(-128,16777215,16,17,18,19,20,20),(2147483647,4294967295,21,22,23,24,25,25);
|
|
INSERT INTO t5 VALUES(0,-2147483648,1,2,3,4,5,5),(255,-8388608,6,7,8,9,10,10),(65535,-32768,11,12,13,14,15,15),(16777215,-128,16,17,18,19,20,20),(4294967295,2147483647,21,22,23,24,25,25);
|
|
INSERT INTO t4(c2,c3) VALUES(31,32) /* tries to increment out of range */;
|
|
ERROR 22003: Out of range value for column 'c1' at row 1
|
|
INSERT INTO t5(c2,c3) VALUES(33,34) /* tries to increment out of range */;
|
|
ERROR 22003: Out of range value for column 'c1' at row 1
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
-128 16777215 16 17 18 19 20 20
|
|
-2147483648 0 1 2 3 4 5 5
|
|
-32768 65535 11 12 13 14 15 15
|
|
-8388608 255 6 7 8 9 10 10
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
2147483647 4294967295 21 22 23 24 25 25
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
INSERT INTO t1 VALUES(-255,-2147483649,26,27,28,29,30),(4294967296,2147483648,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
INSERT INTO t2 VALUES(-255,-2147483649,26,27,28,29,30),(4294967296,2147483648,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
INSERT INTO t3 VALUES(-255,-2147483649,26,27,28,29,30),(4294967296,2147483648,31,32,33,34,35);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
22 0 4294967295
|
|
SELECT * FROM t2 WHERE c2 = -2147483648;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
255 9
|
|
4294967295 24
|
|
4294967295 34
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 19
|
|
4294967295 34
|
|
4294967295 24
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
22 0 4294967295
|
|
SELECT * FROM t2 WHERE c2 = 2147483647;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
255 9
|
|
4294967295 24
|
|
4294967295 34
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 19
|
|
4294967295 34
|
|
4294967295 24
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 = 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 = 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 = 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <> 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 <> 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 < 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 < 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <= 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <= 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 <> 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 >= 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 < 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t2 WHERE c1 < 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <= 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 4294967295 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 IN (0,4294967295) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 4294967295 AND c6 = 9 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
22 0 4294967295
|
|
SELECT * FROM t2 WHERE c2 = -2147483649;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
255 9
|
|
4294967295 24
|
|
4294967295 34
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 19
|
|
4294967295 34
|
|
4294967295 24
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <> -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 > -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 >= -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -255 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
22 0 4294967295
|
|
SELECT * FROM t2 WHERE c2 = 2147483648;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 29
|
|
0 30
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
255 9
|
|
4294967295 24
|
|
4294967295 34
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 29
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 19
|
|
4294967295 34
|
|
4294967295 24
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <> 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 < 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <= 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <= 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <> 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 < 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <= 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -255 AND 4294967296 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-255,4294967296) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -255 AND c1 < 4294967296 AND c6 = 29 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 -2147483648 26 27 28 29 30
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -2147483648 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
21 -2147483648 2147483647
|
|
SELECT * FROM t3 WHERE c1 = 0;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 20
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-32768 15
|
|
-8388608 10
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
2147483647 25
|
|
2147483647 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-8388608 10
|
|
-32768 15
|
|
-128 20
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
2147483647 35
|
|
2147483647 25
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 = -2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <> -2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> -2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 > -2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 > -2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 < -2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= -2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> -2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 <> -2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 > -2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 > -2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 < -2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= -2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
21 -2147483648 2147483647
|
|
SELECT * FROM t3 WHERE c1 = 4294967295;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 20
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-32768 15
|
|
-8388608 10
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
2147483647 25
|
|
2147483647 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-8388608 10
|
|
-32768 15
|
|
-128 20
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
2147483647 35
|
|
2147483647 25
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 = 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 <> 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 <> 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 < 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 < 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <= 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 <> 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 >= 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 < 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 < 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 <= 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483648 AND 2147483647 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483648,2147483647) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= -2147483648 AND c2 < 2147483647 AND c7 = 20 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -128 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
21 -2147483648 2147483647
|
|
SELECT * FROM t3 WHERE c1 = -255;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 20
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-32768 15
|
|
-8388608 10
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
2147483647 25
|
|
2147483647 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-8388608 10
|
|
-32768 15
|
|
-128 20
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
2147483647 35
|
|
2147483647 25
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = -2147483649 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -2147483649 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -2147483649 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -2147483649 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> -2147483649 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> -2147483649 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > -2147483649 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 > -2147483649 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 < -2147483649 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -2147483649 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -2147483649 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -2147483649 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483649 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483649 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> -2147483649 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 <> -2147483649 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > -2147483649 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 > -2147483649 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 < -2147483649 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -2147483649 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -2147483649 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -2147483649 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483649 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -2147483649 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -128 16 17 18 19 20
|
|
255 -8388608 6 7 8 9 10
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
65535 -32768 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
21 -2147483648 2147483647
|
|
SELECT * FROM t3 WHERE c1 = 4294967296;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 20
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-32768 15
|
|
-8388608 10
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
2147483647 25
|
|
2147483647 35
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-2147483648 30
|
|
-2147483648 5
|
|
-8388608 10
|
|
-32768 15
|
|
-128 20
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
2147483647 35
|
|
2147483647 25
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 < 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <= 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
4294967295 2147483647 21 22 23 24 25
|
|
4294967295 2147483647 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 1 2 3 4 5
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 <> 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 < 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 <= 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -2147483649 AND 2147483648 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (-2147483649,2147483648) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -2147483649 AND c2 < 2147483648 AND c7 = 30 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
255 -8388608 6 7 8 9 10
|
|
65535 -32768 11 12 13 14 15
|
|
16777215 -128 16 17 18 19 20
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
4294967295 2147483647 31 32 33 34 35
|
|
4294967295 2147483647 21 22 23 24 25
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -2147483648 26 27 28 29 30
|
|
0 -2147483648 1 2 3 4 5
|
|
DROP TABLE t1,t2,t3,t4,t5;
|
|
CREATE TABLE t1(c1 BIGINT UNSIGNED NOT NULL, c2 BIGINT NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INT, c7 INTEGER);
|
|
CREATE TABLE t2(c1 BIGINT UNSIGNED NOT NULL, c2 BIGINT NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INT, c7 INTEGER, PRIMARY KEY(c1,c6));
|
|
CREATE TABLE t3(c1 BIGINT UNSIGNED NOT NULL, c2 BIGINT NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INT, c7 INTEGER, index idx(c2,c7));
|
|
INSERT INTO t1 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t2 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t3 VALUES(101,-102,103,104,105,106,107),(108,-109,110,111,112,113,114),(115,-116,117,118,119,120,121),(122,-123,124,125,126,127,128);
|
|
INSERT INTO t2 VALUES(108,-109,110,111,112,101,114),(108,-109,110,111,112,102,114),(102,-109,110,111,112,113,114),(103,-109,110,111,112,113,114);
|
|
INSERT INTO t3 VALUES(101,-102,103,104,105,106,101),(101,-102,103,104,105,106,102),(101,-103,103,104,105,106,107),(101,-104,103,104,105,106,107);
|
|
INSERT INTO t1 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t2 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t3 VALUES(105,NULL,102,103,104,105,106);
|
|
INSERT INTO t1 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t2 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t3 VALUES('','',17,18,19,20,21);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t1 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t2 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t3 VALUES(-1,124,22,23,24,25,26);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t1 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t2 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t3 VALUES(0,124,27,28,29,30,31);
|
|
INSERT INTO t1 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t2 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t3 VALUES(0,0,32,32,34,35,36);
|
|
INSERT INTO t1 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
INSERT INTO t2 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
INSERT INTO t3 VALUES('101.34 a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
SELECT * FROM t1;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t1;
|
|
total_rows min_value max_value sum avg
|
|
10 0 122 652 65.2000
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t1;
|
|
total_rows min_value max_value sum avg
|
|
10 -123 124 -202 -22.4444
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t2;
|
|
total_rows min_value max_value sum avg
|
|
14 0 122 1073 76.6429
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t2;
|
|
total_rows min_value max_value sum avg
|
|
14 -123 124 -638 -49.0769
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t3;
|
|
total_rows min_value max_value sum avg
|
|
14 0 122 1056 75.4286
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) as max_value, sum(c2) as sum, avg(c2) as avg FROM t3;
|
|
total_rows min_value max_value sum avg
|
|
14 -123 124 -613 -47.1538
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
14 0 122
|
|
SELECT * FROM t2 WHERE c2 = 102;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 35
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 25
|
|
0 20
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 = 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t2 WHERE c1 < 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 <= 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
SELECT * FROM t2 WHERE c1 <=> 108 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 101 AND 115 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (101,115) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 101 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
14 0 122
|
|
SELECT * FROM t2 WHERE c2 = 102;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 35
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 30
|
|
0 25
|
|
0 20
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 115 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t2 WHERE c1 IN (0,115) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
108 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 115 AND c6 = 113 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
14 -123 124
|
|
SELECT * FROM t3 WHERE c1 = 108;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 = -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 <> -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 > -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 >= -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
SELECT * FROM t3 WHERE c2 < -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 <= -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
SELECT * FROM t3 WHERE c2 <=> -102 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -123 AND 0 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
SELECT * FROM t3 WHERE c2 IN (-123,0) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 >= -123 AND c2 < 0 AND c7 = 121 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
14 -123 124
|
|
SELECT * FROM t3 WHERE c1 = 108;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
108 -109 110 111 112 113 114
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 <=> NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN NULL AND -123 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 IN (NULL,-123) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= NULL AND c2 < -123 AND c7 = 121 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
SELECT c2 FROM t3 GROUP BY c2;
|
|
c2
|
|
-102
|
|
-103
|
|
-104
|
|
-109
|
|
-116
|
|
-123
|
|
0
|
|
124
|
|
NULL
|
|
SELECT DISTINCT c2 FROM t3;
|
|
c2
|
|
-102
|
|
-103
|
|
-104
|
|
-109
|
|
-116
|
|
-123
|
|
0
|
|
124
|
|
NULL
|
|
SELECT c2,MIN(c7) FROM t3 GROUP BY c2;
|
|
c2 MIN(c7)
|
|
-102 101
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
0 21
|
|
124 26
|
|
NULL 106
|
|
CREATE TABLE t4(c1 BIGINT SIGNED NOT NULL AUTO_INCREMENT, c2 BIGINT UNSIGNED NULL, c3 BIGINT UNSIGNED NOT NULL, c4 TINYINT , c5 SMALLINT, c6 MEDIUMINT, c7 INT, c8 INTEGER, PRIMARY KEY(c1), UNIQUE INDEX idx(c2,c3));
|
|
CREATE TABLE t5(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, c2 BIGINT SIGNED NULL, c3 BIGINT SIGNED NOT NULL, c4 TINYINT, c5 SMALLINT, c6 MEDIUMINT, c7 INT, c8 INTEGER, PRIMARY KEY(c1,c2), UNIQUE INDEX(c3));
|
|
INSERT INTO t4 VALUES(-101,102,103,104,105,106,107,108),(-108,109,110,111,112,113,114,115);
|
|
INSERT INTO t5 VALUES(101,-102,-103,-104,105,106,107,108),(108,-109,-110,111,112,113,114,115);
|
|
INSERT INTO t4 VALUES(0,32,33,34,35,36,37,38);
|
|
INSERT INTO t5 VALUES(0,-32,-32,33,34,35,36,37);
|
|
INSERT INTO t4(c1,c3,c4) VALUES(NULL,104,LAST_INSERT_ID());
|
|
INSERT INTO t5(c1,c3,c4) VALUES(NULL,-104,LAST_INSERT_ID());
|
|
Warnings:
|
|
Warning 1364 Field 'c2' doesn't have a default value
|
|
INSERT INTO t4 VALUES('','',17,18,19,20,21,22);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t5 VALUES('','',-17,18,19,20,21,22);
|
|
Warnings:
|
|
Warning 1366 Incorrect integer value: '' for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: '' for column 'c2' at row 1
|
|
INSERT INTO t4 VALUES('102.34 a','a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
|
|
INSERT INTO t5 VALUES('102.34 a','a','a',37,38,39,40,41);
|
|
Warnings:
|
|
Warning 1265 Data truncated for column 'c1' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c2' at row 1
|
|
Warning 1366 Incorrect integer value: 'a' for column 'c3' at row 1
|
|
INSERT INTO t4 VALUES(4,7,8,9,10,11,12,13);
|
|
INSERT INTO t5 VALUES(-1,-1,-1,8,9,10,11,12);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
INSERT INTO t4(c2,c3,c4,c5,c6,c7,c8) VALUES(101,102,104,105,106,107,108),(108,109,111,112,113,114,115),(115,116,118,119,120,121,122),(122,123,125,126,127,128,128);
|
|
INSERT INTO t5(c2,c3,c4,c5,c6,c7,c8) VALUES(-101,-102,104,105,106,107,108),(-108,-109,111,112,113,114,115),(-115,-116,118,119,120,121,122),(-122,-123,125,126,127,128,128);
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t4;
|
|
total_rows min_value max_value sum avg
|
|
11 -108 106 321 29.1818
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) as max_value, sum(c1) as sum, avg(c1) as avg FROM t5;
|
|
total_rows min_value max_value sum avg
|
|
11 101 116 1211 110.0909
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t4;
|
|
total_rows min_value max(c1)
|
|
11 -108 106
|
|
SELECT * FROM t4 WHERE c4 = 104;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
103 101 102 104 105 106 107 108
|
|
SELECT c1 FROM t4;
|
|
c1
|
|
-101
|
|
-108
|
|
1
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
2
|
|
3
|
|
4
|
|
SELECT c1 FROM t4 ORDER BY c1 DESC;
|
|
c1
|
|
106
|
|
105
|
|
104
|
|
103
|
|
102
|
|
4
|
|
3
|
|
2
|
|
1
|
|
-101
|
|
-108
|
|
SELECT * FROM t4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 = 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <> 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 > 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 >= 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 < 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 <=> 1 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t4;
|
|
total_rows min_value max(c1)
|
|
11 -108 106
|
|
SELECT * FROM t4 WHERE c4 = 104;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
103 101 102 104 105 106 107 108
|
|
SELECT c1 FROM t4;
|
|
c1
|
|
-101
|
|
-108
|
|
1
|
|
102
|
|
103
|
|
104
|
|
105
|
|
106
|
|
2
|
|
3
|
|
4
|
|
SELECT c1 FROM t4 ORDER BY c1 DESC;
|
|
c1
|
|
106
|
|
105
|
|
104
|
|
103
|
|
102
|
|
4
|
|
3
|
|
2
|
|
1
|
|
-101
|
|
-108
|
|
SELECT * FROM t4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 = 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
4 7 8 9 10 11 12 13
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
1 32 33 34 35 36 37 38
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <> 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 > 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
SELECT * FROM t4 WHERE c1 >= 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 < 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <= 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 <=> 0 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 BETWEEN -101 AND 4 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 IN (-101,4) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
4 7 8 9 10 11 12 13
|
|
-101 102 103 104 105 106 107 108
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 >= -101 AND c1 < 4 AND c3 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
104 108 109 111 112 113 114 115
|
|
103 101 102 104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
4 7 8 9 10 11 12 13
|
|
3 0 17 18 19 20 21 22
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
1 32 33 34 35 36 37 38
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
SELECT * FROM t4 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
106 122 123 125 126 127 128 128
|
|
105 115 116 118 119 120 121 122
|
|
SELECT * FROM t5;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t5;
|
|
total_rows min_value max(c1)
|
|
11 101 116
|
|
SELECT * FROM t5 WHERE c5 = 112;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
114 -108 -109 111 112 113 114 115
|
|
SELECT c1 FROM t5;
|
|
c1
|
|
101
|
|
102
|
|
108
|
|
109
|
|
110
|
|
111
|
|
112
|
|
113
|
|
114
|
|
115
|
|
116
|
|
SELECT c1 FROM t5 ORDER BY c1 DESC;
|
|
c1
|
|
116
|
|
115
|
|
114
|
|
113
|
|
112
|
|
111
|
|
110
|
|
109
|
|
108
|
|
102
|
|
101
|
|
SELECT * FROM t5 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 = 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
108 -109 -110 111 112 113 114 115
|
|
109 -32 -32 33 34 35 36 37
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
111 0 -17 18 19 20 21 22
|
|
112 -1 -1 8 9 10 11 12
|
|
113 -101 -102 104 105 106 107 108
|
|
114 -108 -109 111 112 113 114 115
|
|
115 -115 -116 118 119 120 121 122
|
|
116 -122 -123 125 126 127 128 128
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
101 -102 -103 -104 105 106 107 108
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 <> 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
SELECT * FROM t5 WHERE c1 > 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 >= 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 < 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 <= 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 <=> 109 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
109 -32 -32 33 34 35 36 37
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 BETWEEN 0 AND 112 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 IN (0,112) ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
112 -1 -1 8 9 10 11 12
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 >= 0 AND c1 < 112 AND c2 = -108 ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
114 -108 -109 111 112 113 114 115
|
|
113 -101 -102 104 105 106 107 108
|
|
112 -1 -1 8 9 10 11 12
|
|
111 0 -17 18 19 20 21 22
|
|
110 0 -104 2 NULL NULL NULL NULL
|
|
109 -32 -32 33 34 35 36 37
|
|
108 -109 -110 111 112 113 114 115
|
|
102 0 0 37 38 39 40 41
|
|
101 -102 -103 -104 105 106 107 108
|
|
SELECT * FROM t5 WHERE c1 IS NOT NULL ORDER BY c1 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
116 -122 -123 125 126 127 128 128
|
|
115 -115 -116 118 119 120 121 122
|
|
SELECT * FROM t4 WHERE c1=1 OR c2=109;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-108 109 110 111 112 113 114 115
|
|
1 32 33 34 35 36 37 38
|
|
SELECT c2 FROM t4 GROUP BY c2;
|
|
c2
|
|
0
|
|
101
|
|
102
|
|
108
|
|
109
|
|
115
|
|
122
|
|
32
|
|
7
|
|
NULL
|
|
SELECT DISTINCT c2 FROM t4;
|
|
c2
|
|
0
|
|
101
|
|
102
|
|
108
|
|
109
|
|
115
|
|
122
|
|
32
|
|
7
|
|
NULL
|
|
SELECT c2,MIN(c3) FROM t4 GROUP BY c2;
|
|
c2 MIN(c3)
|
|
0 0
|
|
101 102
|
|
102 103
|
|
108 109
|
|
109 110
|
|
115 116
|
|
122 123
|
|
32 33
|
|
7 8
|
|
NULL 104
|
|
INSERT INTO t2(c1) VALUES(NULL);
|
|
ERROR 23000: Column 'c1' cannot be null
|
|
INSERT INTO t3 VALUES(NULL,1,2,3,4,5,6);
|
|
ERROR 23000: Column 'c1' cannot be null
|
|
INSERT INTO t4(c3) VALUES(NULL);
|
|
ERROR 23000: Column 'c3' cannot be null
|
|
INSERT INTO t5(c3) VALUES(NULL);
|
|
ERROR 23000: Column 'c3' cannot be null
|
|
INSERT INTO t4(c1,c3) VALUES(-101,105) /*throws error as the row with c1=-101 exists */;
|
|
ERROR 23000: Duplicate entry '-101' for key 'PRIMARY'
|
|
INSERT INTO t2(c1,c6) VALUES(101,106) /*throws error as the row with c1=101,c6=106 exists */;
|
|
ERROR 23000: Duplicate entry '101-106' for key 'PRIMARY'
|
|
INSERT INTO t5(c1,c2,c3) VALUES(101,-102,4) /*throws error as the row with c1=101,c2=-102 exists */;
|
|
ERROR 23000: Duplicate entry '101--102' for key 'PRIMARY'
|
|
INSERT INTO t5(c3) VALUES(-103) /*throws error as the row with c3=-103 exists */;
|
|
ERROR 23000: Duplicate entry '-103' for key 'c3'
|
|
INSERT INTO t4(c2,c3) VALUES(102,103) /*throws error as the row with c2=102,c3=103 exists */;
|
|
ERROR 23000: Duplicate entry '102-103' for key 'idx'
|
|
CREATE TABLE t6(c1 BIGINT UNSIGNED NOT NULL, c2 BIGINT NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INT, c7 INTEGER);
|
|
INSERT INTO t6 SELECT * FROM t2 where c1 >= 109;
|
|
SELECT * FROM t6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
TRUNCATE TABLE t6;
|
|
INSERT INTO t6 SELECT * FROM t3 where c2 <= -116;
|
|
SELECT * FROM t6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
TRUNCATE TABLE t6;
|
|
CREATE TABLE t7(c1 BIGINT UNSIGNED NOT NULL PRIMARY KEY, c2 BIGINT NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INT, c7 INTEGER);
|
|
CREATE TABLE t8(c1 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, c2 BIGINT NULL, c3 TINYINT, c4 SMALLINT , c5 MEDIUMINT, c6 INT, c7 INTEGER);
|
|
INSERT INTO t6 VALUES(1,-2,2,2,2,2,2),(1,-3,3,3,3,3,3);
|
|
INSERT INTO t7(c1) SELECT t6.c1 FROM t6 LIMIT 1;
|
|
SELECT * FROM t7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
INSERT INTO t8(c1) SELECT t6.c1 FROM t6 LIMIT 1;
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
INSERT INTO t7(c1) SELECT t6.c1 FROM t6 /* throws error as t6 contains duplicate rows for c1=1 */;
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
INSERT INTO t8(c1) SELECT t6.c1 FROM t6 /* throws error as t6 contains duplicate rows for c1=1 */;
|
|
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|
TRUNCATE TABLE t6;
|
|
INSERT INTO t6 VALUES(5,-1,1,1,1,1,1),(6,-2,2,2,2,2,2),(0,-4,4,4,4,4,4),(NULL,-5,5,5,5,5,5);
|
|
Warnings:
|
|
Warning 1048 Column 'c1' cannot be null
|
|
INSERT INTO t8 SELECT * FROM t6;
|
|
SELECT LAST_INSERT_ID() AS last_insert_id;
|
|
last_insert_id
|
|
7
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 NULL NULL NULL NULL NULL NULL
|
|
5 -1 1 1 1 1 1
|
|
6 -2 2 2 2 2 2
|
|
7 -4 4 4 4 4 4
|
|
8 -5 5 5 5 5 5
|
|
TRUNCATE TABLE t8;
|
|
INSERT INTO t8(c2) SELECT c2 FROM t6 WHERE c1 >= 6;
|
|
SELECT * FROM t8;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
1 -2 NULL NULL NULL NULL NULL
|
|
DROP TABLE t6,t7,t8;
|
|
INSERT INTO t2 SET c3=5,c4=6;
|
|
Warnings:
|
|
Warning 1364 Field 'c1' doesn't have a default value
|
|
Warning 1364 Field 'c6' doesn't have a default value
|
|
SET SQL_MODE=STRICT_ALL_TABLES;
|
|
INSERT INTO t2 SET c3=5,c4=6;
|
|
ERROR HY000: Field 'c1' doesn't have a default value
|
|
SET SQL_MODE='';
|
|
INSERT INTO t1 VALUES(0,-9223372036854775808,1,2,3,4,5),(255,-2147483648,6,7,8,9,10),(65535,-8388608,11,12,13,14,15),(16777215,-32768,16,17,18,19,20),(4294967295,-128,21,22,23,24,25),(18446744073709551615,9223372036854775807,26,27,28,29,30);
|
|
INSERT INTO t2 VALUES(0,-9223372036854775808,1,2,3,4,5),(255,-2147483648,6,7,8,9,10),(65535,-8388608,11,12,13,14,15),(16777215,-32768,16,17,18,19,20),(4294967295,-128,21,22,23,24,25),(18446744073709551615,9223372036854775807,26,27,28,29,30);
|
|
INSERT INTO t3 VALUES(0,-9223372036854775808,1,2,3,4,5),(255,-2147483648,6,7,8,9,10),(65535,-8388608,11,12,13,14,15),(16777215,-32768,16,17,18,19,20),(4294967295,-128,21,22,23,24,25),(18446744073709551615,9223372036854775807,26,27,28,29,30);
|
|
INSERT INTO t4 VALUES(-9223372036854775808,0,1,2,3,4,5,5),(-2147483648,255,6,7,8,9,10,10),(-8388608,65535,11,12,13,14,15,15),(-32768,16777215,16,17,18,19,20,20),(-128,4294967295,21,22,23,24,25,25),(9223372036854775807,18446744073709551615,26,27,28,29,30,30);
|
|
INSERT INTO t5 VALUES(0,-9223372036854775808,1,2,3,4,5,5),(255,-2147483648,6,7,8,9,10,10),(65535,-8388608,11,12,13,14,15,15),(16777215,-32768,16,17,18,19,20,20),(4294967295,-128,21,22,23,24,25,25),(18446744073709551615,9223372036854775807,26,27,28,29,30,30);
|
|
INSERT INTO t4(c2,c3) VALUES(31,32) /* tries to increment out of range */;
|
|
ERROR 22003: Out of range value for column 'c1' at row 1
|
|
INSERT INTO t5(c2,c3) VALUES(33,34) /* tries to increment out of range */;
|
|
ERROR HY000: Failed to read auto-increment value from storage engine
|
|
SELECT * FROM t4;
|
|
c1 c2 c3 c4 c5 c6 c7 c8
|
|
-101 102 103 104 105 106 107 108
|
|
-108 109 110 111 112 113 114 115
|
|
-128 4294967295 21 22 23 24 25 25
|
|
-2147483648 255 6 7 8 9 10 10
|
|
-32768 16777215 16 17 18 19 20 20
|
|
-8388608 65535 11 12 13 14 15 15
|
|
-9223372036854775808 0 1 2 3 4 5 5
|
|
1 32 33 34 35 36 37 38
|
|
102 0 0 37 38 39 40 41
|
|
103 101 102 104 105 106 107 108
|
|
104 108 109 111 112 113 114 115
|
|
105 115 116 118 119 120 121 122
|
|
106 122 123 125 126 127 128 128
|
|
2 NULL 104 109 NULL NULL NULL NULL
|
|
3 0 17 18 19 20 21 22
|
|
4 7 8 9 10 11 12 13
|
|
9223372036854775807 18446744073709551615 26 27 28 29 30 30
|
|
INSERT INTO t1 VALUES(-128,-9223372036854775809,31,32,33,34,35),(18446744073709551616,9223372036854775808,36,37,38,39,40);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
INSERT INTO t2 VALUES(-128,-9223372036854775809,31,32,33,34,35),(18446744073709551616,9223372036854775808,36,37,38,39,40);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
INSERT INTO t3 VALUES(-128,-9223372036854775809,31,32,33,34,35),(18446744073709551616,9223372036854775808,36,37,38,39,40);
|
|
Warnings:
|
|
Warning 1264 Out of range value for column 'c1' at row 1
|
|
Warning 1264 Out of range value for column 'c2' at row 1
|
|
Warning 1264 Out of range value for column 'c1' at row 2
|
|
Warning 1264 Out of range value for column 'c2' at row 2
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -32768 16 17 18 19 20
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
255 -2147483648 6 7 8 9 10
|
|
4294967295 -128 21 22 23 24 25
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
23 0 18446744073709551615
|
|
SELECT * FROM t2 WHERE c2 = -9223372036854775808;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 34
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
18446744073709551615 29
|
|
18446744073709551615 39
|
|
255 9
|
|
4294967295 24
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 34
|
|
0 30
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 19
|
|
4294967295 24
|
|
18446744073709551615 39
|
|
18446744073709551615 29
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 = 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (0,18446744073709551615) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 IN (0,18446744073709551615) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 18446744073709551615 AND c6 = 14 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 18446744073709551615 AND c6 = 14 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 <> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 > 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 <= 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
SELECT * FROM t2 WHERE c1 <=> 0 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (0,18446744073709551615) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IN (0,18446744073709551615) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 18446744073709551615 AND c6 = 14 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 18446744073709551615 AND c6 = 14 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -32768 16 17 18 19 20
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
255 -2147483648 6 7 8 9 10
|
|
4294967295 -128 21 22 23 24 25
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
23 0 18446744073709551615
|
|
SELECT * FROM t2 WHERE c2 = 9223372036854775807;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 34
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
18446744073709551615 29
|
|
18446744073709551615 39
|
|
255 9
|
|
4294967295 24
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 34
|
|
0 30
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 19
|
|
4294967295 24
|
|
18446744073709551615 39
|
|
18446744073709551615 29
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 = 18446744073709551615 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 = 18446744073709551615 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 = 18446744073709551615 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 = 18446744073709551615 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 <> 18446744073709551615 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <> 18446744073709551615 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > 18446744073709551615 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 18446744073709551615 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 18446744073709551615 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 >= 18446744073709551615 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 < 18446744073709551615 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 < 18446744073709551615 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <= 18446744073709551615 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 <= 18446744073709551615 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 18446744073709551615 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 <=> 18446744073709551615 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (0,18446744073709551615) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 IN (0,18446744073709551615) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 18446744073709551615 AND c6 = 14 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 18446744073709551615 AND c6 = 14 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 18446744073709551615 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 <> 18446744073709551615 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 > 18446744073709551615 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 18446744073709551615 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 18446744073709551615 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= 18446744073709551615 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 < 18446744073709551615 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
SELECT * FROM t2 WHERE c1 < 18446744073709551615 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <= 18446744073709551615 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 <= 18446744073709551615 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <=> 18446744073709551615 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 <=> 18446744073709551615 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN 0 AND 18446744073709551615 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (0,18446744073709551615) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IN (0,18446744073709551615) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 18446744073709551615 AND c6 = 14 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 >= 0 AND c1 < 18446744073709551615 AND c6 = 14 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -32768 16 17 18 19 20
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
255 -2147483648 6 7 8 9 10
|
|
4294967295 -128 21 22 23 24 25
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
23 0 18446744073709551615
|
|
SELECT * FROM t2 WHERE c2 = -9223372036854775809;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 34
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
18446744073709551615 29
|
|
18446744073709551615 39
|
|
255 9
|
|
4294967295 24
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 34
|
|
0 30
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 19
|
|
4294967295 24
|
|
18446744073709551615 39
|
|
18446744073709551615 29
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 = -128 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -128 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -128 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = -128 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <> -128 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 <> -128 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > -128 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 > -128 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 >= -128 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 >= -128 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 < -128 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < -128 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -128 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -128 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -128 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -128 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -128 AND 18446744073709551616 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -128 AND 18446744073709551616 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (-128,18446744073709551616) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-128,18446744073709551616) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -128 AND c1 < 18446744073709551616 AND c6 = 34 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= -128 AND c1 < 18446744073709551616 AND c6 = 34 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> -128 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 <> -128 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 > -128 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 > -128 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= -128 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 >= -128 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 < -128 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < -128 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -128 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <= -128 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -128 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> -128 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -128 AND 18446744073709551616 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -128 AND 18446744073709551616 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IN (-128,18446744073709551616) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-128,18446744073709551616) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -128 AND c1 < 18446744073709551616 AND c6 = 34 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= -128 AND c1 < 18446744073709551616 AND c6 = 34 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -32768 16 17 18 19 20
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
255 -2147483648 6 7 8 9 10
|
|
4294967295 -128 21 22 23 24 25
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c1) as min_value, max(c1) FROM t2;
|
|
total_rows min_value max(c1)
|
|
23 0 18446744073709551615
|
|
SELECT * FROM t2 WHERE c2 = 9223372036854775808;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c1,c6 FROM t2;
|
|
c1 c6
|
|
0 0
|
|
0 20
|
|
0 25
|
|
0 30
|
|
0 34
|
|
0 35
|
|
0 4
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 101
|
|
108 102
|
|
108 113
|
|
115 120
|
|
122 127
|
|
16777215 19
|
|
18446744073709551615 29
|
|
18446744073709551615 39
|
|
255 9
|
|
4294967295 24
|
|
65535 14
|
|
SELECT c1,c6 FROM t2 ORDER BY c1,c6 DESC;
|
|
c1 c6
|
|
0 35
|
|
0 34
|
|
0 30
|
|
0 25
|
|
0 20
|
|
0 4
|
|
0 0
|
|
101 106
|
|
101 40
|
|
102 113
|
|
103 113
|
|
105 105
|
|
108 113
|
|
108 102
|
|
108 101
|
|
115 120
|
|
122 127
|
|
255 9
|
|
65535 14
|
|
16777215 19
|
|
4294967295 24
|
|
18446744073709551615 39
|
|
18446744073709551615 29
|
|
SELECT * FROM t2 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 = 18446744073709551616 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 18446744073709551616 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 18446744073709551616 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 = 18446744073709551616 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <> 18446744073709551616 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 <> 18446744073709551616 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 > 18446744073709551616 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 18446744073709551616 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 18446744073709551616 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 18446744073709551616 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 18446744073709551616 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 < 18446744073709551616 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <= 18446744073709551616 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 <= 18446744073709551616 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <=> 18446744073709551616 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> 18446744073709551616 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -128 AND 18446744073709551616 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -128 AND 18446744073709551616 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 IN (-128,18446744073709551616) ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-128,18446744073709551616) ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -128 AND c1 < 18446744073709551616 AND c6 = 34 ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= -128 AND c1 < 18446744073709551616 AND c6 = 34 ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 0 17 18 19 20 21
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
101 -102 103 104 105 106 107
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 101 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 NULL 5 6 NULL 0 NULL
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t2 WHERE c1 <> 18446744073709551616 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 <> 18446744073709551616 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 > 18446744073709551616 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 > 18446744073709551616 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 18446744073709551616 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= 18446744073709551616 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 < 18446744073709551616 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 < 18446744073709551616 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <= 18446744073709551616 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 <= 18446744073709551616 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 <=> 18446744073709551616 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 <=> 18446744073709551616 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -128 AND 18446744073709551616 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 BETWEEN -128 AND 18446744073709551616 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IN (-128,18446744073709551616) ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IN (-128,18446744073709551616) ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 >= -128 AND c1 < 18446744073709551616 AND c6 = 34 ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 >= -128 AND c1 < 18446744073709551616 AND c6 = 34 ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
0 0 17 18 19 20 21
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 NULL 5 6 NULL 0 NULL
|
|
101 -102 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
102 -109 110 111 112 113 114
|
|
103 -109 110 111 112 113 114
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
108 -109 110 111 112 102 114
|
|
108 -109 110 111 112 101 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t2 WHERE c1 IS NOT NULL ORDER BY c1,c6 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 0 32 32 34 35 36
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -32768 16 17 18 19 20
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
255 -2147483648 6 7 8 9 10
|
|
4294967295 -128 21 22 23 24 25
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
22 -9223372036854775808 9223372036854775807
|
|
SELECT * FROM t3 WHERE c1 = 0;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 25
|
|
-2147483648 10
|
|
-32768 20
|
|
-8388608 15
|
|
-9223372036854775808 35
|
|
-9223372036854775808 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
9223372036854775807 30
|
|
9223372036854775807 40
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-9223372036854775808 35
|
|
-9223372036854775808 5
|
|
-2147483648 10
|
|
-8388608 15
|
|
-32768 20
|
|
-128 25
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
9223372036854775807 40
|
|
9223372036854775807 30
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = -9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = -9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = -9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 = -9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <> -9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 <> -9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 > -9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 > -9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 < -9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <= -9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <=> -9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <=> -9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775808 AND 9223372036854775807 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775808 AND 9223372036854775807 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775808,9223372036854775807) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775808,9223372036854775807) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775808 AND c2 < 9223372036854775807 AND c7 = 20 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -32768 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775808 AND c2 < 9223372036854775807 AND c7 = 20 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -32768 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> -9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> -9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 > -9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > -9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 < -9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= -9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> -9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> -9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775808 AND 9223372036854775807 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775808 AND 9223372036854775807 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775808,9223372036854775807) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775808,9223372036854775807) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775808 AND c2 < 9223372036854775807 AND c7 = 20 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -32768 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775808 AND c2 < 9223372036854775807 AND c7 = 20 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -32768 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -32768 16 17 18 19 20
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
255 -2147483648 6 7 8 9 10
|
|
4294967295 -128 21 22 23 24 25
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
22 -9223372036854775808 9223372036854775807
|
|
SELECT * FROM t3 WHERE c1 = 18446744073709551615;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 25
|
|
-2147483648 10
|
|
-32768 20
|
|
-8388608 15
|
|
-9223372036854775808 35
|
|
-9223372036854775808 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
9223372036854775807 30
|
|
9223372036854775807 40
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-9223372036854775808 35
|
|
-9223372036854775808 5
|
|
-2147483648 10
|
|
-8388608 15
|
|
-32768 20
|
|
-128 25
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
9223372036854775807 40
|
|
9223372036854775807 30
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = 9223372036854775807 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 = 9223372036854775807 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 = 9223372036854775807 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 = 9223372036854775807 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> 9223372036854775807 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 <> 9223372036854775807 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 > 9223372036854775807 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 9223372036854775807 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 9223372036854775807 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 >= 9223372036854775807 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 < 9223372036854775807 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
SELECT * FROM t3 WHERE c2 < 9223372036854775807 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <= 9223372036854775807 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 <= 9223372036854775807 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <=> 9223372036854775807 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 <=> 9223372036854775807 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775808 AND 9223372036854775807 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775808 AND 9223372036854775807 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775808,9223372036854775807) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775808,9223372036854775807) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775808 AND c2 < 9223372036854775807 AND c7 = 20 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -32768 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775808 AND c2 < 9223372036854775807 AND c7 = 20 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -32768 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> 9223372036854775807 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 <> 9223372036854775807 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > 9223372036854775807 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 9223372036854775807 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 9223372036854775807 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= 9223372036854775807 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 < 9223372036854775807 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
SELECT * FROM t3 WHERE c2 < 9223372036854775807 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= 9223372036854775807 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= 9223372036854775807 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> 9223372036854775807 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <=> 9223372036854775807 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775808 AND 9223372036854775807 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775808 AND 9223372036854775807 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775808,9223372036854775807) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775808,9223372036854775807) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775808 AND c2 < 9223372036854775807 AND c7 = 20 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -32768 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775808 AND c2 < 9223372036854775807 AND c7 = 20 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
16777215 -32768 16 17 18 19 20
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -32768 16 17 18 19 20
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
255 -2147483648 6 7 8 9 10
|
|
4294967295 -128 21 22 23 24 25
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
22 -9223372036854775808 9223372036854775807
|
|
SELECT * FROM t3 WHERE c1 = -128;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 25
|
|
-2147483648 10
|
|
-32768 20
|
|
-8388608 15
|
|
-9223372036854775808 35
|
|
-9223372036854775808 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
9223372036854775807 30
|
|
9223372036854775807 40
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-9223372036854775808 35
|
|
-9223372036854775808 5
|
|
-2147483648 10
|
|
-8388608 15
|
|
-32768 20
|
|
-128 25
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
9223372036854775807 40
|
|
9223372036854775807 30
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = -9223372036854775809 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -9223372036854775809 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -9223372036854775809 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = -9223372036854775809 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> -9223372036854775809 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 <> -9223372036854775809 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 > -9223372036854775809 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 > -9223372036854775809 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775809 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775809 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 < -9223372036854775809 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -9223372036854775809 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -9223372036854775809 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -9223372036854775809 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -9223372036854775809 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -9223372036854775809 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775809 AND 9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775809 AND 9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775809,9223372036854775808) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775809,9223372036854775808) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> -9223372036854775809 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> -9223372036854775809 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > -9223372036854775809 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 > -9223372036854775809 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775809 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775809 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 < -9223372036854775809 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < -9223372036854775809 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -9223372036854775809 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <= -9223372036854775809 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -9223372036854775809 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> -9223372036854775809 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775809 AND 9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775809 AND 9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775809,9223372036854775808) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775809,9223372036854775808) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -104 103 104 105 106 107
|
|
101 0 37 38 39 40 41
|
|
105 NULL 102 103 104 105 106
|
|
108 -109 110 111 112 113 114
|
|
115 -116 117 118 119 120 121
|
|
122 -123 124 125 126 127 128
|
|
16777215 -32768 16 17 18 19 20
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
255 -2147483648 6 7 8 9 10
|
|
4294967295 -128 21 22 23 24 25
|
|
65535 -8388608 11 12 13 14 15
|
|
SELECT count(*) as total_rows, min(c2) as min_value, max(c2) FROM t3;
|
|
total_rows min_value max(c2)
|
|
22 -9223372036854775808 9223372036854775807
|
|
SELECT * FROM t3 WHERE c1 = 18446744073709551616;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT c2,c7 FROM t3;
|
|
c2 c7
|
|
-102 101
|
|
-102 102
|
|
-102 107
|
|
-103 107
|
|
-104 107
|
|
-109 114
|
|
-116 121
|
|
-123 128
|
|
-128 25
|
|
-2147483648 10
|
|
-32768 20
|
|
-8388608 15
|
|
-9223372036854775808 35
|
|
-9223372036854775808 5
|
|
0 21
|
|
0 36
|
|
0 41
|
|
124 26
|
|
124 31
|
|
9223372036854775807 30
|
|
9223372036854775807 40
|
|
NULL 106
|
|
SELECT c2,c7 FROM t3 ORDER BY c2,c7 DESC;
|
|
c2 c7
|
|
NULL 106
|
|
-9223372036854775808 35
|
|
-9223372036854775808 5
|
|
-2147483648 10
|
|
-8388608 15
|
|
-32768 20
|
|
-128 25
|
|
-123 128
|
|
-116 121
|
|
-109 114
|
|
-104 107
|
|
-103 107
|
|
-102 107
|
|
-102 102
|
|
-102 101
|
|
0 41
|
|
0 36
|
|
0 21
|
|
124 31
|
|
124 26
|
|
9223372036854775807 40
|
|
9223372036854775807 30
|
|
SELECT * FROM t3 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 = 9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 = 9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <> 9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 <> 9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 > 9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < 9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 < 9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <= 9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 <= 9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <=> 9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> 9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775809 AND 9223372036854775808 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775809 AND 9223372036854775808 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775809,9223372036854775808) ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775809,9223372036854775808) ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 101
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 107
|
|
0 0 17 18 19 20 21
|
|
0 0 32 32 34 35 36
|
|
101 0 37 38 39 40 41
|
|
0 124 22 23 24 25 26
|
|
0 124 27 28 29 30 31
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 <> 9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <> 9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 > 9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 > 9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 >= 9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 < 9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 < 9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <= 9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 <= 9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 <=> 9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 <=> 9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775809 AND 9223372036854775808 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 BETWEEN -9223372036854775809 AND 9223372036854775808 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775809,9223372036854775808) ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 IN (-9223372036854775809,9223372036854775808) ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 >= -9223372036854775809 AND c2 < 9223372036854775808 AND c7 = 35 ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
105 NULL 102 103 104 105 106
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
255 -2147483648 6 7 8 9 10
|
|
65535 -8388608 11 12 13 14 15
|
|
16777215 -32768 16 17 18 19 20
|
|
4294967295 -128 21 22 23 24 25
|
|
122 -123 124 125 126 127 128
|
|
115 -116 117 118 119 120 121
|
|
108 -109 110 111 112 113 114
|
|
101 -104 103 104 105 106 107
|
|
101 -103 103 104 105 106 107
|
|
101 -102 103 104 105 106 107
|
|
101 -102 103 104 105 106 102
|
|
101 -102 103 104 105 106 101
|
|
101 0 37 38 39 40 41
|
|
0 0 32 32 34 35 36
|
|
0 0 17 18 19 20 21
|
|
0 124 27 28 29 30 31
|
|
0 124 22 23 24 25 26
|
|
18446744073709551615 9223372036854775807 36 37 38 39 40
|
|
18446744073709551615 9223372036854775807 26 27 28 29 30
|
|
SELECT * FROM t3 WHERE c2 IS NOT NULL ORDER BY c2,c7 DESC LIMIT 2;
|
|
c1 c2 c3 c4 c5 c6 c7
|
|
0 -9223372036854775808 31 32 33 34 35
|
|
0 -9223372036854775808 1 2 3 4 5
|
|
DROP TABLE t1,t2,t3,t4,t5;
|