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

📄 longcolumn.out

📁 derby database source code.good for you.
💻 OUT
📖 第 1 页 / 共 5 页
字号:
ij> -- test sinle long column table-- create table with one long column-- test 1: one long columnrun resource 'createTestProcedures.subsql';ij> CREATE FUNCTION  PADSTRING (DATA VARCHAR(32000), LENGTH INTEGER) RETURNS VARCHAR(32000) EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.Formatters.padString' LANGUAGE JAVA PARAMETER STYLE JAVA;0 rows inserted/updated/deletedij> CREATE PROCEDURE WAIT_FOR_POST_COMMIT() DYNAMIC RESULT SETS 0 LANGUAGE JAVA EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.T_Access.waitForPostCommitToFinish' PARAMETER STYLE JAVA;0 rows inserted/updated/deletedij> call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.storage.pageSize', '4096');0 rows inserted/updated/deletedij> create table testing (a varchar(8096)) ;0 rows inserted/updated/deletedij> insert into testing values (PADSTRING('1 2 3 4 5 6 7 8 9 0', 8096));1 row inserted/updated/deletedij> insert into testing values (PADSTRING('a b c d e f g h i j', 8096));1 row inserted/updated/deletedij> insert into testing values (PADSTRING('11 22 33 44 55 66 77', 8096));1 row inserted/updated/deletedij> insert into testing values (PADSTRING('aa bb cc dd ee ff gg', 8096));1 row inserted/updated/deletedij> -- should return 4 rowsselect 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> -- drop the tabledrop table testing;0 rows inserted/updated/deletedij> -- test 2: testing two column (1 short, 1 long) tablecreate table testing (a int, b varchar(32384)) ;0 rows inserted/updated/deletedij> insert into testing values (1, PADSTRING('1 2 3 4 5 6 7 8 9 0', 32384));1 row inserted/updated/deletedij> insert into testing values (2, PADSTRING('a b c d e f g h i j', 32384));1 row inserted/updated/deletedij> insert into testing values (3, PADSTRING('11 22 33 44 55 66 77', 32384));1 row inserted/updated/deletedij> insert into testing values (4, PADSTRING('aa bb cc dd ee ff gg', 32384));1 row inserted/updated/deletedij> -- should return 4 rowsselect * from testing;A          |B                                                                                                                               --------------------------------------------------------------------------------------------------------------------------------------------1          |1 2 3 4 5 6 7 8 9 0                                                                                                            &2          |a b c d e f g h i j                                                                                                            &3          |11 22 33 44 55 66 77                                                                                                           &4          |aa bb cc dd ee ff gg                                                                                                           &ij> select a from testing;A          -----------1          2          3          4          ij> select b from testing;B                                                                                                                               --------------------------------------------------------------------------------------------------------------------------------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 1 rowselect b from testing where a = 1;B                                                                                                                               --------------------------------------------------------------------------------------------------------------------------------1 2 3 4 5 6 7 8 9 0                                                                                                            &ij> -- drop the tabledrop table testing;0 rows inserted/updated/deletedij> -- test 3: testing two column (1 long, 1 shor) tablecreate table testing (a varchar(32384), b int) ;0 rows inserted/updated/deletedij> insert into testing values (PADSTRING('1 2 3 4 5 6 7 8 9 0',32384), 1);1 row inserted/updated/deletedij> insert into testing values (PADSTRING('a b c d e f g h i j',32384), 2);1 row inserted/updated/deletedij> insert into testing values (PADSTRING('11 22 33 44 55 66 77',32384), 3);1 row inserted/updated/deletedij> insert into testing values (PADSTRING('aa bb cc dd ee ff gg',32384), 4);1 row inserted/updated/deletedij> -- should return 4 rowsselect * from testing;A                                                                                                                               |B          --------------------------------------------------------------------------------------------------------------------------------------------1 2 3 4 5 6 7 8 9 0                                                                                                            &|1          a b c d e f g h i j                                                                                                            &|2          11 22 33 44 55 66 77                                                                                                           &|3          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> -- should return 1 rowselect a from testing where b = 4;

⌨️ 快捷键说明

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