NULL和INITIAL的区别 and database interface
在用INSERT语句往database table里插入entry时,对于description field(CHAR类型的),如果 不指定任何value,和手动给该field assign value 类似
Ls-description = space, 这两种情况插入到database后的效果一样么?
搞清楚SE11里这个勾是拿来做什么的?
如果table structure append了一个新的structure,那么后面append的对应的字段就会为NULL。就是下面这个link上有个人回复的。我觉得,前半部分是make sense的,但是,他说,这个is null只在where 语句中有效,如果是数据已经选取出来了,放在了internal table里面了,那么就都是initial了。。。
[外链图片转存失败(img-e14KI5kJ-1563802589007)(https://user-images.githubusercontent.com/5669954/32713336-cd09cb64-c883-11e7-95b2-f9db76f1743b.png)]
关于NULL和INITIAL的,做了个实验:
-
创建一个新的database table:
[外链图片转存失败(img-V4r9ftA0-1563802589008)(https://user-images.githubusercontent.com/5669954/32713338-cd3e92a4-c883-11e7-8231-d393dd17d8e3.png)] -
插入两条数据:
[外链图片转存失败(img-pHrG2dkZ-1563802589008)(https://user-images.githubusercontent.com/5669954/32713339-cd75812e-c883-11e7-93e4-e1c7bf52fcc4.png)]
- 插入一个include structure, initial value未勾上:
[外链图片转存失败(img-zNwgxUhc-1563802589009)(https://user-images.githubusercontent.com/5669954/32713340-cdae61ba-c883-11e7-9ae1-1ecc1333919d.png)]
- 测试:
[外链图片转存失败(img-zdUUZm66-1563802589009)(https://user-images.githubusercontent.com/5669954/32713341-cde1c424-c883-11e7-8628-0c9e24433639.png)]
执行结果:
[外链图片转存失败(img-rKP2l2rV-1563802589010)(https://user-images.githubusercontent.com/5669954/32713342-ce186a74-c883-11e7-958d-5b6d0409c110.png)]
[外链图片转存失败(img-fpCotxAj-1563802589010)(https://user-images.githubusercontent.com/5669954/32713343-ce5025d6-c883-11e7-8721-256b3e8d7a4f.png)]
注:
-
上述测试是在QI2/506 ( MaxDB)上做的,如果换到HANA DB上,即使我不勾initial value,所有的IS NOT NULL都会返回true,我也不清楚HANA DB为什么要这样设计。
-
“刚刚问了一下XXX,她说有一种情况,也是我在做hana preview的时候看到的,就是,如果我们用的是left out join,右边的表里面其实没有对应的数据,那么对应的字段就会显示为NULL.” – 根据ABAP help,只有outer join才会出现你说的情况
-
“如果是数据已经选取出来了,放在了internal table里面了,那么就都是initial了。。。- 根据ABAP help和我在QI2上的测试,确实如ABAP help说的,NULL 取回internal table之后就自动变成initial了。
我猜想“在HANA studio里观察preview的结果”和“在ABAP里使用open SQL将数据取回internal table里”,这两件事不是一回事吧?
ABAP里 写代码去database server取数据要通过database interface:http://help.sap.com/saphelp_nw04s/helpdata/en/fc/eb3976358411d1829f0000e829fbfe/content.htm
相关文章
- ORA-01228: SET DATABASE option required to install seed database ORACLE 报错 故障修复 远程处理
- ORA-47953: Oracle Data Pump authorization for Oracle Database Vault to string on schema string already exists ORACLE 报错 故障修复 远程处理
- ORA-01621: cannot rename member of current log if database is open ORACLE 报错 故障修复 远程处理
- ORA-12323: unable to open database (link name string) ORACLE 报错 故障修复 远程处理
- ORA-13521: Unregister operation on local Database id (string) not allowed ORACLE 报错 故障修复 远程处理
- ORA-16206: database already configured as Logical Standby database ORACLE 报错 故障修复 远程处理
- ORA-16448: Primary database corruption has been detected by standby database. ORACLE 报错 故障修复 远程处理
- ORA-16541: database is not enabled ORACLE 报错 故障修复 远程处理
- ORA-16736: unable to find the destination entry of standby database “string” in V$ARCHIVE_DEST ORACLE 报错 故障修复 远程处理
- ORA-16820: fast-start failover observer is no longer observing this database ORACLE 报错 故障修复 远程处理
- ORA-16831: operation disallowed on this standby database type ORACLE 报错 故障修复 远程处理
- MySQL Variables skip_show_database 数据库 参数变量解释及正确配置使用
- Z0061Oracle Database 12c:1Z0061 考试向导(oraclea1)
- MySQL MVC: Model the Future of Database(mysqlmvc)
- Exploring the Power of MySQL Predicates for Enhanced Database Functionality(mysql谓词)
- Effortlessly Connect Your Ideas to Oracle Database with This Ultimate Guide(idea连接oracle数据库)
- Exploring the Benefits of Oracle 11g Character Set for Database Management(oracle11g字符集)