doc-exports/docs/dws/tool/dws_16_0116.html
Lu, Huayi 27019c2991 DWS TOOL 830.201 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-05-16 07:35:25 +00:00

38 lines
2.5 KiB
HTML

<a name="EN-US_TOPIC_0000001819336169"></a><a name="EN-US_TOPIC_0000001819336169"></a>
<h1 class="topictitle1">JSON Types</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001819336169__en-us_topic_0000001658024866_en-us_topic_0000001397115256_section1639314358205"><h4 class="sectiontitle">Overview</h4><p id="EN-US_TOPIC_0000001819336169__en-us_topic_0000001658024866_en-us_topic_0000001397115256_p04718426201">The JSON data type can be used to store JavaScript Object Notation (JSON) data. DSC supports the following type conversions:</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001819336169__en-us_topic_0000001658024866_en-us_topic_0000001397115256_section89141635183114"><h4 class="sectiontitle">Type Mapping</h4><p id="EN-US_TOPIC_0000001819336169__en-us_topic_0000001658024866_en-us_topic_0000001397115256_en-us_topic_0214164703_p8060118"><strong id="EN-US_TOPIC_0000001819336169__en-us_topic_0000001658024866_en-us_topic_0000001397115256_en-us_topic_0214164703_b9136102519199">Input Example (JSON)</strong></p>
<pre class="screen" id="EN-US_TOPIC_0000001819336169__en-us_topic_0000001658024866_en-us_topic_0000001397115256_en-us_topic_0214164703_screen17940112818193">CREATE TABLE IF NOT EXISTS `runoob_dataType_test`(
`dataType_1` INT,
`dataType_2` VARCHAR,
`dataType_3` JSON
);
ALTER TABLE `runoob_dataType_test` ADD COLUMN `dataType_4` JSON NOT NULL;
ALTER TABLE `runoob_dataType_test` CHANGE COLUMN `dataType_4` `dataType_5` JSON NOT NULL;</pre>
<p id="EN-US_TOPIC_0000001819336169__en-us_topic_0000001658024866_en-us_topic_0000001397115256_en-us_topic_0214164703_p837154111192"><strong id="EN-US_TOPIC_0000001819336169__en-us_topic_0000001658024866_en-us_topic_0000001397115256_en-us_topic_0214164703_b28071508198">Output</strong></p>
<pre class="screen" id="EN-US_TOPIC_0000001819336169__en-us_topic_0000001658024866_en-us_topic_0000001397115256_en-us_topic_0214164703_screen151561253121913">CREATE TABLE IF NOT EXISTS "public"."runoob_datatype_test"
(
"datatype_1" INTEGER,
"datatype_2" VARCHAR,
"datatype_3" JSONB
)
WITH ( ORIENTATION = ROW, COMPRESSION = NO )
NOCOMPRESS
DISTRIBUTE BY HASH ("datatype_1");
ALTER TABLE
"public"."runoob_datatype_test"
ADD
COLUMN "datatype_4" JSONB;
ALTER TABLE
"public"."runoob_datatype_test" CHANGE COLUMN "datatype_4" "datatype_5" JSONB;</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_16_0106.html">Data Types</a></div>
</div>
</div>