⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 longcolumn.out

📁 derby database source code.good for you.
💻 OUT
📖 第 1 页 / 共 5 页
字号:
A                                                                                                                               --------------------------------------------------------------------------------------------------------------------------------aa bb cc dd ee ff gg                                                                                                           &ij> -- drop the tabledrop table testing;0 rows inserted/updated/deletedij> -- test 4: testing three column (1 short, 1 long, 1 short) tablecreate table testing (z int, a varchar(32384), b int) ;0 rows inserted/updated/deletedij> insert into testing values (0, PADSTRING('1 2 3 4 5 6 7 8 9 0',32384), 1);1 row inserted/updated/deletedij> insert into testing values (1, PADSTRING('a b c d e f g h i j',32384), 2);1 row inserted/updated/deletedij> insert into testing values (2, PADSTRING('11 22 33 44 55 66 77',32384), 3);1 row inserted/updated/deletedij> insert into testing values (4, PADSTRING('aa bb cc dd ee ff gg',32384), 4);1 row inserted/updated/deletedij> -- should return 4 rowsselect * from testing;Z          |A                                                                                                                               |B          --------------------------------------------------------------------------------------------------------------------------------------------------------0          |1 2 3 4 5 6 7 8 9 0                                                                                                            &|1          1          |a b c d e f g h i j                                                                                                            &|2          2          |11 22 33 44 55 66 77                                                                                                           &|3          4          |aa bb cc dd ee ff gg                                                                                                           &|4          ij> select a from testing;A                                                                                                                               --------------------------------------------------------------------------------------------------------------------------------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> select b from testing;B          -----------1          2          3          4          ij> select z from testing;Z          -----------0          1          2          4          ij> -- should return 1 rowselect b from testing where z = b;B          -----------4          ij> -- try creating btree index on long column, should failcreate 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> -- update the long column 5 timesupdate testing set a = PADSTRING('update once', 32384);4 rows inserted/updated/deletedij> update testing set a = PADSTRING('update twice', 32384);4 rows inserted/updated/deletedij> update testing set a = PADSTRING('update three times', 32384);4 rows inserted/updated/deletedij> update testing set a = PADSTRING('update four times', 32384);4 rows inserted/updated/deletedij> update testing set a = PADSTRING('update five times', 32384);4 rows inserted/updated/deletedij> -- select should return 4 rowsselect a from testing;A                                                                                                                               --------------------------------------------------------------------------------------------------------------------------------update five times                                                                                                              &update five times                                                                                                              &update five times                                                                                                              &update five times                                                                                                              &ij> -- drop the tabledrop table testing;0 rows inserted/updated/deletedij> -- test 5: testing three columns (1 long, 1 short, 1 long) tablecreate table testing (a varchar(32384), b int, c varchar(32084)) ;0 rows inserted/updated/deletedij> insert into testing values (PADSTRING('1 2 3 4 5 6 7 8 9 0',32384), 1, PADSTRING('1 2 3 4 5 6 7 8 9 0',32084));1 row inserted/updated/deletedij> insert into testing values (PADSTRING('a b c d e f g h i j',32384), 2, PADSTRING('a b c d e f g h i j',32084));1 row inserted/updated/deletedij> insert into testing values (PADSTRING('11 22 33 44 55 66 77',32384), 3, PADSTRING('11 22 33 44 55 66 77',32084));1 row inserted/updated/deletedij> insert into testing values (PADSTRING('aa bb cc dd ee ff gg',32384), 4, PADSTRING('aa bb cc dd ee ff gg',32084));1 row inserted/updated/deletedij> -- should return 4 rowsselect * from testing;A                                                                                                                               |B          |C                                                                                                                               -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------1 2 3 4 5 6 7 8 9 0                                                                                                            &|1          |1 2 3 4 5 6 7 8 9 0                                                                                                            &a b c d e f g h i j                                                                                                            &|2          |a b c d e f g h i j                                                                                                            &11 22 33 44 55 66 77                                                                                                           &|3          |11 22 33 44 55 66 77                                                                                                           &aa bb cc dd ee ff gg                                                                                                           &|4          |aa bb cc dd ee ff gg                                                                                                           &ij> select a from testing;A                                                                                                                               --------------------------------------------------------------------------------------------------------------------------------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> select b from testing;B          -----------1          2          

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -