NULL和INITIAL的区别 and database interface

简介: 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)]


注:


image.png

image.png

我猜想“在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


相关文章
|
3月前
|
JavaScript
JS中Null和Undefined的区别及用法
JS中Null和Undefined的区别及用法
36 1
|
3月前
|
JavaScript 前端开发 算法
undefined与null的区别
在JavaScript中,undefined和null都表示变量未被赋值或值缺失,但它们在使用场景上有一些区别。 - **`语义不同`**:undefined表示一个变量未被赋值或者声明后未进行初始化。而null表示一个变量被明确地设置为无值或者表示空值的概念。 - **`类型不同`**:undefined是一种基本数据类型,而null是一个引用类型。 - **`条件判断`**:在条件判断中,使用if (variable === undefined)或者if (variable === null)可以进行区分。
|
11月前
|
编译器 C语言 C++
再谈NULL和nullptr(C++11)区别
在谈NULL和nullptr区别之前,我们先看段代码:
113 0
|
21天前
|
Unix Linux Shell
nohup 与 >/dev/null 与 2>&1 作用与区别
nohup 与 >/dev/null 与 2>&1 作用与区别
19 0
|
2月前
|
JavaScript 前端开发
null、未定义或未声明的变量之间有什么区别
null、未定义或未声明的变量之间有什么区别
|
3月前
|
C语言
C语言(9)----NULL、null(或者NUL)、\0、0、‘0’几者之间的区别
C语言(9)----NULL、null(或者NUL)、\0、0、‘0’几者之间的区别
35 0
|
3月前
|
前端开发 JavaScript
【Web 前端】undefined 和 null 区别?
【4月更文挑战第22天】【Web 前端】undefined 和 null 区别?
【Web 前端】undefined 和 null 区别?
|
3月前
|
安全 编译器 C语言
NULL和nullptr到底是什么?它们的区别又是什么?
NULL和nullptr到底是什么?它们的区别又是什么?
|
3月前
|
JavaScript 前端开发 Python
js中null和undefined的区别是什么
js中null和undefined的区别是什么
33 3
|
11月前
|
存储 关系型数据库 MySQL
MySQL数据库的表中 NULL 和 空值 到底有什么区别呢?
一篇短文让你明白MySQL数据库的表中 NULL 和 空值之间的区别!
4885 0
MySQL数据库的表中 NULL 和 空值 到底有什么区别呢?