📄 longcolumn.out
字号:
3 4 ij> select c from testing;C --------------------------------------------------------------------------------------------------------------------------------1 2 3 4 5 6 7 8 9 0 &a b c d e f g h i j &11 22 33 44 55 66 77 &aa bb cc dd ee ff gg &ij> -- should return one rowselect * from testing where b = 4;A |B |C -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------aa bb cc dd ee ff gg &|4 |aa bb cc dd ee ff gg &ij> -- try creating btree index, should fail on long columnscreate index zz on testing (a) ;ERROR XSCB6: Limitation: Record of a btree secondary index cannot be updated or inserted due to lack of space on the page. Use the parameters derby.storage.pageSize and/or derby.storage.pageReservedSpace to work around this limitation.ij> create index zz on testing (c) ;ERROR XSCB6: Limitation: Record of a btree secondary index cannot be updated or inserted due to lack of space on the page. Use the parameters derby.storage.pageSize and/or derby.storage.pageReservedSpace to work around this limitation.ij> create index zz on testing (b);0 rows inserted/updated/deletedij> -- update the last long column 10 timesupdate testing set c = PADSTRING('update 0', 32084);4 rows inserted/updated/deletedij> update testing set c = PADSTRING('update 1', 32084);4 rows inserted/updated/deletedij> update testing set c = PADSTRING('update 2', 32084);4 rows inserted/updated/deletedij> update testing set c = PADSTRING('update 3', 32084);4 rows inserted/updated/deletedij> update testing set c = PADSTRING('update 4', 32084);4 rows inserted/updated/deletedij> update testing set c = PADSTRING('update 5', 32084);4 rows inserted/updated/deletedij> update testing set c = PADSTRING('update 6', 32084);4 rows inserted/updated/deletedij> update testing set c = PADSTRING('update 7', 32084);4 rows inserted/updated/deletedij> update testing set c = PADSTRING('update 8', 32084);4 rows inserted/updated/deletedij> update testing set c = PADSTRING('update 9', 32084);4 rows inserted/updated/deletedij> -- select should return 4 rowsselect * from testing;A |B |C -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------1 2 3 4 5 6 7 8 9 0 &|1 |update 9 &a b c d e f g h i j &|2 |update 9 &11 22 33 44 55 66 77 &|3 |update 9 &aa bb cc dd ee ff gg &|4 |update 9 &ij> -- drop the tabledrop table testing;0 rows inserted/updated/deletedij> -- test 6: table with 5 columns (1 short, 1 long, 1 short, 1 long, 1 short) tablecreate table testing (a int, b clob(64768), c int, d varchar(32384), e int) ;0 rows inserted/updated/deletedij> insert into testing values (0, PADSTRING('1 2 3 4 5 6 7 8 9 0', 64768), 1, PADSTRING('1 2 3 4 5 6 7 8 9 0', 32384), 2);1 row inserted/updated/deletedij> insert into testing values (1, PADSTRING('a b c d e f g h i j', 64768), 2, PADSTRING('a b c d e f g h i j', 32384), 3);1 row inserted/updated/deletedij> insert into testing values (2, PADSTRING('11 22 33 44 55 66 77', 64768), 3, PADSTRING('11 22 33 44 55 66 77', 32384), 4);1 row inserted/updated/deletedij> insert into testing values (3, PADSTRING('aa bb cc dd ee ff gg', 64768), 4, PADSTRING('aa bb cc dd ee ff gg',32384), 5);1 row inserted/updated/deletedij> insert into testing values (4, PADSTRING('1 2 3 4 5 6 7 8 9 0', 64768), 5, PADSTRING('aa bb cc dd ee ff gg',32384), 6);1 row inserted/updated/deletedij> insert into testing values (5, PADSTRING('a b c d e f g h i j', 64768), 6, PADSTRING('aa bb cc dd ee ff gg',32384), 7);1 row inserted/updated/deletedij> insert into testing values (6, PADSTRING('11 22 33 44 55 66 77', 64768), 7, PADSTRING('aa bb cc dd ee ff gg',32384), 8);1 row inserted/updated/deletedij> insert into testing values (7, PADSTRING('aa bb cc dd ee ff gg', 64768), 8, PADSTRING('aa bb cc dd ee ff gg',32384), 9);1 row inserted/updated/deletedij> -- select shoudl return 8 rowsselect * from testing;A |B |C |D |E -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------0 |1 2 3 4 5 6 7 8 9 0 &|1 |1 2 3 4 5 6 7 8 9 0 &|2 1 |a b c d e f g h i j &|2 |a b c d e f g h i j &|3 2 |11 22 33 44 55 66 77 &|3 |11 22 33 44 55 66 77 &|4 3 |aa bb cc dd ee ff gg &|4 |aa bb cc dd ee ff gg &|5 4 |1 2 3 4 5 6 7 8 9 0 &|5 |aa bb cc dd ee ff gg &|6 5 |a b c d e f g h i j &|6 |aa bb cc dd ee ff gg &|7 6 |11 22 33 44 55 66 77 &|7 |aa bb cc dd ee ff gg &|8 7 |aa bb cc dd ee ff gg &|8 |aa bb cc dd ee ff gg &|9 ij> select a from testing;A -----------0 1 2 3 4 5 6 7 ij> select b, d from testing;B |D -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------1 2 3 4 5 6 7 8 9 0 &|1 2 3 4 5 6 7 8 9 0 &a b c d e f g h i j &|a b c d e f g h i j &11 22 33 44 55 66 77 &|11 22 33 44 55 66 77 &aa bb cc dd ee ff gg &|aa bb cc dd ee ff gg &1 2 3 4 5 6 7 8 9 0 &|aa bb cc dd ee ff gg &a b c d e f g h i j &|aa bb cc dd ee ff gg &11 22 33 44 55 66 77 &|aa bb cc dd ee ff gg &aa bb cc dd ee ff gg &|aa bb cc dd ee ff gg &ij> select a, c, d from testing;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -