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

📄 bit.out

📁 derby database source code.good for you.
💻 OUT
📖 第 1 页 / 共 3 页
字号:
B10                                     ----------------------------------------2020202020202020202020202020202020202020000000001120202020202020202020202020202011111111112020202020202020202020202020201120202020202020202020202020202020202020ij> select b10 from t where b10 <> X'0000000011';B10                                     ----------------------------------------2020202020202020202020202020202020202020000000000120202020202020202020202020202011111111112020202020202020202020202020201120202020202020202020202020202020202020ij> select vb10 from t where vb10 > X'0000000010';VB10                                    ----------------------------------------0000000011                              1111111111                              11                                      ij> select vb10 from t where vb10 < X'0000000010';VB10                                    ----------------------------------------0000000001                              ij> select vb10 from t where vb10 <= X'0000000011';VB10                                    ----------------------------------------0000000001                              0000000011                              ij> select vb10 from t where vb10 >= X'0000000011';VB10                                    ----------------------------------------0000000011                              1111111111                              11                                      ij> select vb10 from t where vb10 <> X'0000000011';VB10                                    ----------------------------------------0000000001                              1111111111                              11                                      ij> select b16 from t where b16 > X'0000000010';B16 ----202001200320ff20aa20ij> select b16 from t where b16 < X'0000000010';B16 ----ij> select b16 from t where b16 <= X'0000000011';B16 ----ij> select b16 from t where b16 >= X'0000000011';B16 ----202001200320ff20aa20ij> select b16 from t where b16 <> X'0000000011';B16 ----202001200320ff20aa20ij> select vb16 from t where vb16 > X'0000000010';VB16----01  03  ff  aa  ij> select vb16 from t where vb16 < X'0000000010';VB16----ij> select vb16 from t where vb16 <= X'0000000011';VB16----ij> select vb16 from t where vb16 >= X'0000000011';VB16----01  03  ff  aa  ij> select vb16 from t where vb16 <> X'0000000011';VB16----01  03  ff  aa  ij> select lbv from t where lbv > X'0000000010';ERROR 42818: Comparisons between 'LONG VARCHAR FOR BIT DATA' and 'CHAR () FOR BIT DATA' are not supported.ij> select lbv from t where lbv < X'0000000010';ERROR 42818: Comparisons between 'LONG VARCHAR FOR BIT DATA' and 'CHAR () FOR BIT DATA' are not supported.ij> select lbv from t where lbv <= X'0000000011';ERROR 42818: Comparisons between 'LONG VARCHAR FOR BIT DATA' and 'CHAR () FOR BIT DATA' are not supported.ij> select lbv from t where lbv >= X'0000000011';ERROR 42818: Comparisons between 'LONG VARCHAR FOR BIT DATA' and 'CHAR () FOR BIT DATA' are not supported.ij> select lbv from t where lbv <> X'0000000011';ERROR 42818: Comparisons between 'LONG VARCHAR FOR BIT DATA' and 'CHAR () FOR BIT DATA' are not supported.ij> select b10, vb10||X'11' from t where vb10||X'11' > b10;B10                                     |2                                         -----------------------------------------------------------------------------------ij> select b10, X'11'||vb10 from t where X'11'||vb10 > b10;B10                                     |2                                         -----------------------------------------------------------------------------------0000000001202020202020202020202020202020|110000000001                              0000000011202020202020202020202020202020|110000000011                              ij> select b16, vb16||X'11' from t where vb16||X'11' > b16;B16 |2     -----------ij> select b10 || vb10 from t;1                                                                               --------------------------------------------------------------------------------NULL                                                                            2020202020202020202020202020202020202020                                        00000000012020202020202020202020202020200000000001                              00000000112020202020202020202020202020200000000011                              11111111112020202020202020202020202020201111111111                              112020202020202020202020202020202020202011                                      ij> select lbv || b10 from t;1                                                                                                                               --------------------------------------------------------------------------------------------------------------------------------NULL                                                                                                                            2020202020202020202020202020202020202020                                                                                        00000000010000000001202020202020202020202020202020                                                                              030000000011202020202020202020202020202020                                                                                      11111111111111111111202020202020202020202020202020                                                                              aa1120202020202020202020202020202020202020                                                                                      ij> select b10 || lbv from t;1                                                                                                                               --------------------------------------------------------------------------------------------------------------------------------NULL                                                                                                                            2020202020202020202020202020202020202020                                                                                        00000000012020202020202020202020202020200000000001                                                                              000000001120202020202020202020202020202003                                                                                      11111111112020202020202020202020202020201111111111                                                                              1120202020202020202020202020202020202020aa                                                                                      ij> select lbv || vb10 from t;1                                                                                                                               --------------------------------------------------------------------------------------------------------------------------------NULL                                                                                                                            00000000010000000001                                                                                                            030000000011                                                                                                                    11111111111111111111                                                                                                            aa11                                                                                                                            ij> select vb10 || lbv from t;1                                                                                                                               --------------------------------------------------------------------------------------------------------------------------------NULL                                                                                                                            00000000010000000001                                                                                                            000000001103                                                                                                                    11111111111111111111                                                                                                            11aa                                                                                                                            ij> select t1.b10 from t t1, t t2 where t1.b10 > t2.b10;B10                                     ----------------------------------------2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020000000001120202020202020202020202020202011111111112020202020202020202020202020201111111111202020202020202020202020202020112020202020202020202020202020202020202011202020202020202020202020202020202020201120202020202020202020202020202020202020ij> -- FUNCTIONS-- some length functionsselect {fn length(b10)} from t;ERROR 42846: Cannot convert types 'CHAR () FOR BIT DATA' to 'VARCHAR'.ij> select {fn length(vb10)} from t;ERROR 42846: Cannot convert types 'VARCHAR () FOR BIT DATA' to 'VARCHAR'.ij> select {fn length(lbv)} from t;ERROR 42846: Cannot convert types 'LONG VARCHAR FOR BIT DATA' to 'VARCHAR'.ij> select {fn length(c20)} from t;1          -----------4          1          1          1          2          2          ij> select {fn length(cv20)} from t;1          -----------12         18         1          1          2          2          ij> drop table t;0 rows inserted/updated/deletedij> ------------------------- test normalization-----------------------create table t1 (c1 char(2) for bit data);0 rows inserted/updated/deletedij> insert into t1 values (X'0001');1 row inserted/updated/deletedij> insert into t1 values (X'0010');1 row inserted/updated/deletedij> insert into t1 values (X'0011');1 row inserted/updated/deletedij> select * from t1;C1  ----000100100011ij> -- now insert something that needs to be expandedinsert into t1 values (X'11');1 row inserted/updated/deletedij> select * from t1;C1  ----0001001000111120ij> -- insert select, expand 1 bytecreate table t2 (c1 char(3) for bit data);0 rows inserted/updated/deletedij> insert into t2 select c1 from t1;4 rows inserted/updated/deletedij> select * from t2;C1    ------000120001020001120112020ij> drop table t2;0 rows inserted/updated/deletedij> -- insert select, expand many bytescreate table t2 (c1 char(20) for bit data);0 rows inserted/updated/deletedij> insert into t2 select c1 from t1;4 rows inserted/updated/deletedij> select * from t2;C1                                      ----------------------------------------0001202020202020202020202020202020202020001020202020202020202020202020202020202000112020202020202020202020202020202020201120202020202020202020202020202020202020ij> drop table t2;0 rows inserted/updated/deletedij> drop table t1;0 rows inserted/updated/deletedij> ---- some extra tests for truncation.  in 2.0create table t1 (b1 char(1) for bit data);0 rows inserted/updated/deletedij> -- okinsert into t1 values (X'11');1 row inserted/updated/deletedij> -- valid lengthinsert into t1 values (X'10');1 row inserted/updated/deletedij> insert into t1 values (X'11');1 row inserted/updated/deletedij> -- truncation errorsinsert into t1 values (X'1000');ERROR 22001: A truncation error was encountered trying to shrink CHAR () FOR BIT DATA '1000' to length 1.ij> insert into t1 values (X'100000');ERROR 22001: A truncation error was encountered trying to shrink CHAR () FOR BIT DATA '100000' to length 1.ij> insert into t1 values (X'10000000');ERROR 22001: A truncation error was encountered trying to shrink CHAR () FOR BIT DATA '10000000' to length 1.ij> insert into t1 values (X'1000000000');ERROR 22001: A truncation error was encountered trying to shrink CHAR () FOR BIT DATA '1000000000' to length 1.

⌨️ 快捷键说明

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