diff options
Diffstat (limited to 'mysql-test/suite/engines/iuds/r/delete_decimal.result')
-rw-r--r-- | mysql-test/suite/engines/iuds/r/delete_decimal.result | 535 |
1 files changed, 535 insertions, 0 deletions
diff --git a/mysql-test/suite/engines/iuds/r/delete_decimal.result b/mysql-test/suite/engines/iuds/r/delete_decimal.result new file mode 100644 index 00000000..1925bef5 --- /dev/null +++ b/mysql-test/suite/engines/iuds/r/delete_decimal.result @@ -0,0 +1,535 @@ +DROP TABLE IF EXISTS t1,t2,t3,t4; +CREATE TABLE t1(c1 DECIMAL(10,5) UNSIGNED NOT NULL, c2 DECIMAL(10,5) SIGNED NULL, c3 DECIMAL, c4 INT, UNIQUE INDEX idx(c1,c4)); +INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +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 +Note 1265 Data truncated for column 'c3' at row 1 +INSERT INTO t1 values('100.000001','1000.999999','9999.999999',4); +Warnings: +Note 1265 Data truncated for column 'c1' at row 1 +Note 1265 Data truncated for column 'c2' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 +INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); +INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +Note 1265 Data truncated for column 'c3' at row 1 +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +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 +Note 1265 Data truncated for column 'c3' at row 1 +INSERT INTO t1 VALUES('1.0e+4','1.0e-5','1.0e+9',10); +SELECT * FROM t1; +c1 c2 c3 c4 +0.00000 -0.10000 0 8 +0.00000 0.00000 0 6 +1.00000 1.00000 1 7 +100.00000 1001.00000 10000 4 +100.05000 -100.05000 100119 1 +10000.00000 0.00001 1000000000 10 +11111.00009 -9999.99999 9999999 2 +99999.99999 -99999.99999 9999999999 5 +99999.99999 99999.99999 1000000000 3 +99999.99999 99999.99999 111111111 9 +DELETE FROM t1 WHERE c2 > 100 ORDER BY c2 LIMIT 1; +SELECT c1,c2 FROM t1; +c1 c2 +0.00000 -0.10000 +0.00000 0.00000 +1.00000 1.00000 +100.05000 -100.05000 +10000.00000 0.00001 +11111.00009 -9999.99999 +99999.99999 -99999.99999 +99999.99999 99999.99999 +99999.99999 99999.99999 +DELETE FROM t1 WHERE c3=1 AND c4=7; +SELECT * FROM t1; +c1 c2 c3 c4 +0.00000 -0.10000 0 8 +0.00000 0.00000 0 6 +100.05000 -100.05000 100119 1 +10000.00000 0.00001 1000000000 10 +11111.00009 -9999.99999 9999999 2 +99999.99999 -99999.99999 9999999999 5 +99999.99999 99999.99999 1000000000 3 +99999.99999 99999.99999 111111111 9 +DELETE FROM t1 WHERE c3=9999999999 OR c2=1.0e-5; +SELECT * FROM t1 WHERE c1=1.2e+2; +c1 c2 c3 c4 +DELETE FROM t1 WHERE c4 IN (4,5,6); +SELECT * FROM t1; +c1 c2 c3 c4 +0.00000 -0.10000 0 8 +100.05000 -100.05000 100119 1 +11111.00009 -9999.99999 9999999 2 +99999.99999 99999.99999 1000000000 3 +99999.99999 99999.99999 111111111 9 +TRUNCATE t1; +INSERT INTO t1 VALUES ('11111.11111','-11111.11111','1111111111',1),('22222.22222','-22222.22222','2222222222',2),('33333.33333','-33333.33333','3333333333',3),('44444.44444','-44444.44444','4444444444',4),('55555.55555','-55555.55555','5555555555',5),('66666.66666','-66666.66666','6666666666',6),('77777.77777','-77777.77777','7777777777',7),('88888.88888','-88888.88888','8888888888',8),('99999.99999','-99999.99999','9999999999',9); +SELECT * FROM t1; +c1 c2 c3 c4 +11111.11111 -11111.11111 1111111111 1 +22222.22222 -22222.22222 2222222222 2 +33333.33333 -33333.33333 3333333333 3 +44444.44444 -44444.44444 4444444444 4 +55555.55555 -55555.55555 5555555555 5 +66666.66666 -66666.66666 6666666666 6 +77777.77777 -77777.77777 7777777777 7 +88888.88888 -88888.88888 8888888888 8 +99999.99999 -99999.99999 9999999999 9 +SELECT c1 FROM t1 WHERE c1>='22222.22222' AND c1<='55555.55555' ORDER BY c1; +c1 +22222.22222 +33333.33333 +44444.44444 +55555.55555 +DELETE FROM t1 WHERE c1>='22222.22222' AND c1<='55555.55555' ORDER BY c1; +SELECT * FROM t1; +c1 c2 c3 c4 +11111.11111 -11111.11111 1111111111 1 +66666.66666 -66666.66666 6666666666 6 +77777.77777 -77777.77777 7777777777 7 +88888.88888 -88888.88888 8888888888 8 +99999.99999 -99999.99999 9999999999 9 +CREATE TABLE t2(c1 DECIMAL(10,5) NOT NULL, c2 DECIMAL, c3 INT, UNIQUE INDEX idx2(c1,c3)); +CREATE TABLE t3(c1 DECIMAL(10,5) NOT NULL, c2 DECIMAL, c3 INT, UNIQUE INDEX idx3(c1,c3)); +CREATE TABLE t4(c1 DECIMAL(10,5) NOT NULL, c2 DECIMAL, c3 INT, UNIQUE INDEX idx4(c1,c3)); +INSERT INTO t2 VALUES ('11111.11111','1111111111',1),('22222.22222','2222222222',2),('33333.33333','3333333333',3); +INSERT INTO t3 VALUES ('44444.44444','4444444444',4),('55555.55555','5555555555',5),('66666.66666','6666666666',6); +INSERT INTO t4 VALUES ('77777.77777','7777777777',7),('88888.88888','8888888888',8),('99999.99999','9999999999',9); +SELECT * FROM t2; +c1 c2 c3 +11111.11111 1111111111 1 +22222.22222 2222222222 2 +33333.33333 3333333333 3 +SELECT * FROM t3; +c1 c2 c3 +44444.44444 4444444444 4 +55555.55555 5555555555 5 +66666.66666 6666666666 6 +SELECT * FROM t4; +c1 c2 c3 +77777.77777 7777777777 7 +88888.88888 8888888888 8 +99999.99999 9999999999 9 +DELETE t1,t2,t3,t4 FROM t1,t2,t3,t4 WHERE t1.c2 >'1111111111' AND t4.c2 < '8888888888'; +SELECT * FROM t1; +c1 c2 c3 c4 +11111.11111 -11111.11111 1111111111 1 +66666.66666 -66666.66666 6666666666 6 +77777.77777 -77777.77777 7777777777 7 +88888.88888 -88888.88888 8888888888 8 +99999.99999 -99999.99999 9999999999 9 +SELECT * FROM t1; +c1 c2 c3 c4 +11111.11111 -11111.11111 1111111111 1 +66666.66666 -66666.66666 6666666666 6 +77777.77777 -77777.77777 7777777777 7 +88888.88888 -88888.88888 8888888888 8 +99999.99999 -99999.99999 9999999999 9 +SELECT * FROM t1; +c1 c2 c3 c4 +11111.11111 -11111.11111 1111111111 1 +66666.66666 -66666.66666 6666666666 6 +77777.77777 -77777.77777 7777777777 7 +88888.88888 -88888.88888 8888888888 8 +99999.99999 -99999.99999 9999999999 9 +TRUNCATE t2; +TRUNCATE t3; +INSERT INTO t2 VALUES ('11111.11111','1111111111',1),('22222.22222','2222222222',2),('33333.33333','3333333333',3); +INSERT INTO t3 VALUES ('44444.44444','4444444444',4),('55555.55555','5555555555',5),('66666.66666','6666666666',6); +DELETE FROM t2 WHERE t2.c1='22222.22222' AND t2.c3=2; +SELECT * FROM t2; +c1 c2 c3 +11111.11111 1111111111 1 +33333.33333 3333333333 3 +DELETE FROM t2 WHERE c1 BETWEEN '11111' AND '44444'; +SELECT * FROM t2; +c1 c2 c3 +DELETE FROM t2 WHERE c1 IN ('44444.44444','99999.99999'); +SELECT * FROM t2; +c1 c2 c3 +DROP TABLE t2,t3; +CREATE TABLE t2(c1 DECIMAL(10,5) NOT NULL, c2 DECIMAL, c3 INT); +CREATE TABLE t3(c1 DECIMAL(10,5) NOT NULL, c2 DECIMAL, c3 INT, UNIQUE INDEX idx3(c1)); +INSERT INTO t2 VALUES ('11111.11111','1111111111',1),('22222.22222','2222222222',2),('33333.33333','3333333333',3); +INSERT INTO t3 VALUES ('11111.11111','4444444444',1),('55555.55555','5555555555',2),('66666.66666','6666666666',3); +DELETE t2,t3 FROM t2,t3 WHERE t2.c1=t3.c1 AND t2.c3=t3.c3; +SELECT * FROM t1; +c1 c2 c3 c4 +11111.11111 -11111.11111 1111111111 1 +66666.66666 -66666.66666 6666666666 6 +77777.77777 -77777.77777 7777777777 7 +88888.88888 -88888.88888 8888888888 8 +99999.99999 -99999.99999 9999999999 9 +SELECT * FROM t2; +c1 c2 c3 +22222.22222 2222222222 2 +33333.33333 3333333333 3 +SELECT * FROM t3; +c1 c2 c3 +55555.55555 5555555555 2 +66666.66666 6666666666 3 +SELECT * FROM t4; +c1 c2 c3 +77777.77777 7777777777 7 +88888.88888 8888888888 8 +99999.99999 9999999999 9 +DROP TABLES IF EXISTS t1,t2,t3,t4; +CREATE TABLE t1(c1 FLOAT(10,5) UNSIGNED NOT NULL, c2 FLOAT(10,5) SIGNED NULL, c3 FLOAT, c4 INT, UNIQUE INDEX idx(c1,c4)); +INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +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 +INSERT INTO t1 values('100.000001','1000.999999','9999.999999',4); +INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); +INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +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 +INSERT INTO t1 VALUES('1.0e+4','1.0e-5','1.0e+9',10); +SELECT * FROM t1; +c1 c2 c3 c4 +0.00000 -0.10000 -0.1 8 +0.00000 0.00000 0 6 +1.00000 1.00000 1 7 +100.00000 1001.00000 10000 4 +100.05000 -100.05000 100119 1 +10000.00000 0.00001 1000000000 10 +100000.00000 -100000.00000 10000000000 5 +100000.00000 100000.00000 1000000000 3 +100000.00000 100000.00000 111111000 9 +11111.00000 -10000.00000 10000000 2 +DELETE FROM t1 WHERE c2 > 100 ORDER BY c2 LIMIT 1; +SELECT c1,c2 FROM t1; +c1 c2 +0.00000 -0.10000 +0.00000 0.00000 +1.00000 1.00000 +100.05000 -100.05000 +10000.00000 0.00001 +100000.00000 -100000.00000 +100000.00000 100000.00000 +100000.00000 100000.00000 +11111.00000 -10000.00000 +DELETE FROM t1 WHERE c3=1 AND c4=7; +SELECT * FROM t1; +c1 c2 c3 c4 +0.00000 -0.10000 -0.1 8 +0.00000 0.00000 0 6 +100.05000 -100.05000 100119 1 +10000.00000 0.00001 1000000000 10 +100000.00000 -100000.00000 10000000000 5 +100000.00000 100000.00000 1000000000 3 +100000.00000 100000.00000 111111000 9 +11111.00000 -10000.00000 10000000 2 +DELETE FROM t1 WHERE c3=9999999999 OR c2=1.0e-5; +SELECT * FROM t1 WHERE c1=1.2e+2; +c1 c2 c3 c4 +DELETE FROM t1 WHERE c4 IN (4,5,6); +SELECT * FROM t1; +c1 c2 c3 c4 +0.00000 -0.10000 -0.1 8 +100.05000 -100.05000 100119 1 +10000.00000 0.00001 1000000000 10 +100000.00000 100000.00000 1000000000 3 +100000.00000 100000.00000 111111000 9 +11111.00000 -10000.00000 10000000 2 +TRUNCATE t1; +INSERT INTO t1 VALUES ('11111.11111','-11111.11111','1111111111',1),('22222.22222','-22222.22222','2222222222',2),('33333.33333','-33333.33333','3333333333',3),('44444.44444','-44444.44444','4444444444',4),('55555.55555','-55555.55555','5555555555',5),('66666.66666','-66666.66666','6666666666',6),('77777.77777','-77777.77777','7777777777',7),('88888.88888','-88888.88888','8888888888',8),('99999.99999','-99999.99999','9999999999',9); +SELECT * FROM t1; +c1 c2 c3 c4 +100000.00000 -100000.00000 10000000000 9 +11111.11133 -11111.11133 1111110000 1 +22222.22266 -22222.22266 2222220000 2 +33333.33203 -33333.33203 3333330000 3 +44444.44531 -44444.44531 4444440000 4 +55555.55469 -55555.55469 5555560000 5 +66666.66406 -66666.66406 6666670000 6 +77777.78125 -77777.78125 7777780000 7 +88888.89062 -88888.89062 8888890000 8 +SELECT c1 FROM t1 WHERE c1>='22222.22222' AND c1<='55555.55555' ORDER BY c1; +c1 +22222.22266 +33333.33203 +44444.44531 +55555.55469 +DELETE FROM t1 WHERE c1>='22222.22222' AND c1<='55555.55555' ORDER BY c1; +SELECT * FROM t1; +c1 c2 c3 c4 +100000.00000 -100000.00000 10000000000 9 +11111.11133 -11111.11133 1111110000 1 +66666.66406 -66666.66406 6666670000 6 +77777.78125 -77777.78125 7777780000 7 +88888.89062 -88888.89062 8888890000 8 +CREATE TABLE t2(c1 FLOAT(10,5) NOT NULL, c2 FLOAT, c3 INT, UNIQUE INDEX idx2(c1,c3)); +CREATE TABLE t3(c1 FLOAT(10,5) NOT NULL, c2 FLOAT, c3 INT, UNIQUE INDEX idx3(c1,c3)); +CREATE TABLE t4(c1 FLOAT(10,5) NOT NULL, c2 FLOAT, c3 INT, UNIQUE INDEX idx4(c1,c3)); +INSERT INTO t2 VALUES ('11111.11111','1111111111',1),('22222.22222','2222222222',2),('33333.33333','3333333333',3); +INSERT INTO t3 VALUES ('44444.44444','4444444444',4),('55555.55555','5555555555',5),('66666.66666','6666666666',6); +INSERT INTO t4 VALUES ('77777.77777','7777777777',7),('88888.88888','8888888888',8),('99999.99999','9999999999',9); +SELECT * FROM t2; +c1 c2 c3 +11111.11133 1111110000 1 +22222.22266 2222220000 2 +33333.33203 3333330000 3 +SELECT * FROM t3; +c1 c2 c3 +44444.44531 4444440000 4 +55555.55469 5555560000 5 +66666.66406 6666670000 6 +SELECT * FROM t4; +c1 c2 c3 +100000.00000 10000000000 9 +77777.78125 7777780000 7 +88888.89062 8888890000 8 +DELETE t1,t2,t3,t4 FROM t1,t2,t3,t4 WHERE t1.c2 >'1111111111' AND t4.c2 < '8888888888'; +SELECT * FROM t1; +c1 c2 c3 c4 +100000.00000 -100000.00000 10000000000 9 +11111.11133 -11111.11133 1111110000 1 +66666.66406 -66666.66406 6666670000 6 +77777.78125 -77777.78125 7777780000 7 +88888.89062 -88888.89062 8888890000 8 +SELECT * FROM t1; +c1 c2 c3 c4 +100000.00000 -100000.00000 10000000000 9 +11111.11133 -11111.11133 1111110000 1 +66666.66406 -66666.66406 6666670000 6 +77777.78125 -77777.78125 7777780000 7 +88888.89062 -88888.89062 8888890000 8 +SELECT * FROM t1; +c1 c2 c3 c4 +100000.00000 -100000.00000 10000000000 9 +11111.11133 -11111.11133 1111110000 1 +66666.66406 -66666.66406 6666670000 6 +77777.78125 -77777.78125 7777780000 7 +88888.89062 -88888.89062 8888890000 8 +TRUNCATE t2; +TRUNCATE t3; +INSERT INTO t2 VALUES ('11111.11111','1111111111',1),('22222.22222','2222222222',2),('33333.33333','3333333333',3); +INSERT INTO t3 VALUES ('44444.44444','4444444444',4),('55555.55555','5555555555',5),('66666.66666','6666666666',6); +DELETE FROM t2 WHERE t2.c1='22222.22222' AND t2.c3=2; +SELECT * FROM t2; +c1 c2 c3 +11111.11133 1111110000 1 +22222.22266 2222220000 2 +33333.33203 3333330000 3 +DELETE FROM t2 WHERE c1 BETWEEN '11111' AND '44444'; +SELECT * FROM t2; +c1 c2 c3 +DELETE FROM t2 WHERE c1 IN ('44444.44444','99999.99999'); +SELECT * FROM t2; +c1 c2 c3 +DROP TABLE t2,t3; +CREATE TABLE t2(c1 FLOAT(10,5) NOT NULL, c2 FLOAT, c3 INT); +CREATE TABLE t3(c1 FLOAT(10,5) NOT NULL, c2 FLOAT, c3 INT, UNIQUE INDEX idx3(c1)); +INSERT INTO t2 VALUES ('11111.11111','1111111111',1),('22222.22222','2222222222',2),('33333.33333','3333333333',3); +INSERT INTO t3 VALUES ('11111.11111','4444444444',1),('55555.55555','5555555555',2),('66666.66666','6666666666',3); +DELETE t2,t3 FROM t2,t3 WHERE t2.c1=t3.c1 AND t2.c3=t3.c3; +SELECT * FROM t1; +c1 c2 c3 c4 +100000.00000 -100000.00000 10000000000 9 +11111.11133 -11111.11133 1111110000 1 +66666.66406 -66666.66406 6666670000 6 +77777.78125 -77777.78125 7777780000 7 +88888.89062 -88888.89062 8888890000 8 +SELECT * FROM t2; +c1 c2 c3 +22222.22266 2222220000 2 +33333.33203 3333330000 3 +SELECT * FROM t3; +c1 c2 c3 +55555.55469 5555560000 2 +66666.66406 6666670000 3 +SELECT * FROM t4; +c1 c2 c3 +100000.00000 10000000000 9 +77777.78125 7777780000 7 +88888.89062 8888890000 8 +DROP TABLES IF EXISTS t1,t2,t3,t4; +CREATE TABLE t1(c1 DOUBLE(10,5) UNSIGNED NOT NULL, c2 DOUBLE(10,5) SIGNED NULL, c3 DOUBLE, c4 INT, UNIQUE INDEX idx(c1,c4)); +INSERT INTO t1 VALUES('00100.05000','-00100.05000','00100119',1),('11111.00009','-9999.99999','9999999',2); +INSERT IGNORE INTO t1 VALUES('1000000','10000000','1000000000.0001',3); +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 +INSERT INTO t1 values('100.000001','1000.999999','9999.999999',4); +INSERT INTO t1 VALUES('99999.99999','-99999.99999','9999999999',5); +INSERT INTO t1 VALUES ("0.0","0.0","0.0",6),("01.0","01.0","01.0",7); +INSERT IGNORE INTO t1 VALUES ("-.1","-.1","-.1",8); +Warnings: +Warning 1264 Out of range value for column 'c1' at row 1 +INSERT IGNORE INTO t1 VALUES ("+111111111.11","+111111111.11","+111111111.11",9); +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 +INSERT INTO t1 VALUES('1.0e+4','1.0e-5','1.0e+9',10); +SELECT * FROM t1; +c1 c2 c3 c4 +0.00000 -0.10000 -0.1 8 +0.00000 0.00000 0 6 +1.00000 1.00000 1 7 +100.00000 1001.00000 9999.999999 4 +100.05000 -100.05000 100119 1 +10000.00000 0.00001 1000000000 10 +11111.00009 -9999.99999 9999999 2 +99999.99999 -99999.99999 9999999999 5 +99999.99999 99999.99999 1000000000.0001 3 +99999.99999 99999.99999 111111111.11 9 +DELETE FROM t1 WHERE c2 > 100 ORDER BY c2 LIMIT 1; +SELECT c1,c2 FROM t1; +c1 c2 +0.00000 -0.10000 +0.00000 0.00000 +1.00000 1.00000 +100.05000 -100.05000 +10000.00000 0.00001 +11111.00009 -9999.99999 +99999.99999 -99999.99999 +99999.99999 99999.99999 +99999.99999 99999.99999 +DELETE FROM t1 WHERE c3=1 AND c4=7; +SELECT * FROM t1; +c1 c2 c3 c4 +0.00000 -0.10000 -0.1 8 +0.00000 0.00000 0 6 +100.05000 -100.05000 100119 1 +10000.00000 0.00001 1000000000 10 +11111.00009 -9999.99999 9999999 2 +99999.99999 -99999.99999 9999999999 5 +99999.99999 99999.99999 1000000000.0001 3 +99999.99999 99999.99999 111111111.11 9 +DELETE FROM t1 WHERE c3=9999999999 OR c2=1.0e-5; +SELECT * FROM t1 WHERE c1=1.2e+2; +c1 c2 c3 c4 +DELETE FROM t1 WHERE c4 IN (4,5,6); +SELECT * FROM t1; +c1 c2 c3 c4 +0.00000 -0.10000 -0.1 8 +100.05000 -100.05000 100119 1 +11111.00009 -9999.99999 9999999 2 +99999.99999 99999.99999 1000000000.0001 3 +99999.99999 99999.99999 111111111.11 9 +TRUNCATE t1; +INSERT INTO t1 VALUES ('11111.11111','-11111.11111','1111111111',1),('22222.22222','-22222.22222','2222222222',2),('33333.33333','-33333.33333','3333333333',3),('44444.44444','-44444.44444','4444444444',4),('55555.55555','-55555.55555','5555555555',5),('66666.66666','-66666.66666','6666666666',6),('77777.77777','-77777.77777','7777777777',7),('88888.88888','-88888.88888','8888888888',8),('99999.99999','-99999.99999','9999999999',9); +SELECT * FROM t1; +c1 c2 c3 c4 +11111.11111 -11111.11111 1111111111 1 +22222.22222 -22222.22222 2222222222 2 +33333.33333 -33333.33333 3333333333 3 +44444.44444 -44444.44444 4444444444 4 +55555.55555 -55555.55555 5555555555 5 +66666.66666 -66666.66666 6666666666 6 +77777.77777 -77777.77777 7777777777 7 +88888.88888 -88888.88888 8888888888 8 +99999.99999 -99999.99999 9999999999 9 +SELECT c1 FROM t1 WHERE c1>='22222.22222' AND c1<='55555.55555' ORDER BY c1; +c1 +22222.22222 +33333.33333 +44444.44444 +55555.55555 +DELETE FROM t1 WHERE c1>='22222.22222' AND c1<='55555.55555' ORDER BY c1; +SELECT * FROM t1; +c1 c2 c3 c4 +11111.11111 -11111.11111 1111111111 1 +66666.66666 -66666.66666 6666666666 6 +77777.77777 -77777.77777 7777777777 7 +88888.88888 -88888.88888 8888888888 8 +99999.99999 -99999.99999 9999999999 9 +CREATE TABLE t2(c1 DOUBLE(10,5) NOT NULL, c2 DOUBLE, c3 INT, UNIQUE INDEX idx2(c1,c3)); +CREATE TABLE t3(c1 DOUBLE(10,5) NOT NULL, c2 DOUBLE, c3 INT, UNIQUE INDEX idx3(c1,c3)); +CREATE TABLE t4(c1 DOUBLE(10,5) NOT NULL, c2 DOUBLE, c3 INT, UNIQUE INDEX idx4(c1,c3)); +INSERT INTO t2 VALUES ('11111.11111','1111111111',1),('22222.22222','2222222222',2),('33333.33333','3333333333',3); +INSERT INTO t3 VALUES ('44444.44444','4444444444',4),('55555.55555','5555555555',5),('66666.66666','6666666666',6); +INSERT INTO t4 VALUES ('77777.77777','7777777777',7),('88888.88888','8888888888',8),('99999.99999','9999999999',9); +SELECT * FROM t2; +c1 c2 c3 +11111.11111 1111111111 1 +22222.22222 2222222222 2 +33333.33333 3333333333 3 +SELECT * FROM t3; +c1 c2 c3 +44444.44444 4444444444 4 +55555.55555 5555555555 5 +66666.66666 6666666666 6 +SELECT * FROM t4; +c1 c2 c3 +77777.77777 7777777777 7 +88888.88888 8888888888 8 +99999.99999 9999999999 9 +DELETE t1,t2,t3,t4 FROM t1,t2,t3,t4 WHERE t1.c2 >'1111111111' AND t4.c2 < '8888888888'; +SELECT * FROM t1; +c1 c2 c3 c4 +11111.11111 -11111.11111 1111111111 1 +66666.66666 -66666.66666 6666666666 6 +77777.77777 -77777.77777 7777777777 7 +88888.88888 -88888.88888 8888888888 8 +99999.99999 -99999.99999 9999999999 9 +SELECT * FROM t1; +c1 c2 c3 c4 +11111.11111 -11111.11111 1111111111 1 +66666.66666 -66666.66666 6666666666 6 +77777.77777 -77777.77777 7777777777 7 +88888.88888 -88888.88888 8888888888 8 +99999.99999 -99999.99999 9999999999 9 +SELECT * FROM t1; +c1 c2 c3 c4 +11111.11111 -11111.11111 1111111111 1 +66666.66666 -66666.66666 6666666666 6 +77777.77777 -77777.77777 7777777777 7 +88888.88888 -88888.88888 8888888888 8 +99999.99999 -99999.99999 9999999999 9 +TRUNCATE t2; +TRUNCATE t3; +INSERT INTO t2 VALUES ('11111.11111','1111111111',1),('22222.22222','2222222222',2),('33333.33333','3333333333',3); +INSERT INTO t3 VALUES ('44444.44444','4444444444',4),('55555.55555','5555555555',5),('66666.66666','6666666666',6); +DELETE FROM t2 WHERE t2.c1='22222.22222' AND t2.c3=2; +SELECT * FROM t2; +c1 c2 c3 +11111.11111 1111111111 1 +33333.33333 3333333333 3 +DELETE FROM t2 WHERE c1 BETWEEN '11111' AND '44444'; +SELECT * FROM t2; +c1 c2 c3 +DELETE FROM t2 WHERE c1 IN ('44444.44444','99999.99999'); +SELECT * FROM t2; +c1 c2 c3 +DROP TABLE t2,t3; +CREATE TABLE t2(c1 DOUBLE(10,5) NOT NULL, c2 DOUBLE, c3 INT); +CREATE TABLE t3(c1 DOUBLE(10,5) NOT NULL, c2 DOUBLE, c3 INT, UNIQUE INDEX idx3(c1)); +INSERT INTO t2 VALUES ('11111.11111','1111111111',1),('22222.22222','2222222222',2),('33333.33333','3333333333',3); +INSERT INTO t3 VALUES ('11111.11111','4444444444',1),('55555.55555','5555555555',2),('66666.66666','6666666666',3); +DELETE t2,t3 FROM t2,t3 WHERE t2.c1=t3.c1 AND t2.c3=t3.c3; +SELECT * FROM t1; +c1 c2 c3 c4 +11111.11111 -11111.11111 1111111111 1 +66666.66666 -66666.66666 6666666666 6 +77777.77777 -77777.77777 7777777777 7 +88888.88888 -88888.88888 8888888888 8 +99999.99999 -99999.99999 9999999999 9 +SELECT * FROM t2; +c1 c2 c3 +22222.22222 2222222222 2 +33333.33333 3333333333 3 +SELECT * FROM t3; +c1 c2 c3 +55555.55555 5555555555 2 +66666.66666 6666666666 3 +SELECT * FROM t4; +c1 c2 c3 +77777.77777 7777777777 7 +88888.88888 8888888888 8 +99999.99999 9999999999 9 +DROP TABLES IF EXISTS t1,t2,t3,t4; |