forked from docs/doc-exports
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>
32 lines
2.2 KiB
HTML
32 lines
2.2 KiB
HTML
<a name="EN-US_TOPIC_0000001772696184"></a><a name="EN-US_TOPIC_0000001772696184"></a>
|
|
|
|
<h1 class="topictitle1">IF NOT EXISTS</h1>
|
|
<div id="body8662426"><p id="EN-US_TOPIC_0000001772696184__en-us_topic_0000001706104969_en-us_topic_0000001398642140_p8060118">DSC supports the conversion of IF NOT EXISTS, which is reserved during the migration.</p>
|
|
<p id="EN-US_TOPIC_0000001772696184__en-us_topic_0000001706104969_en-us_topic_0000001398642140_p712835684417"><strong id="EN-US_TOPIC_0000001772696184__en-us_topic_0000001706104969_en-us_topic_0000001398642140_b11771161610455">Input</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772696184__en-us_topic_0000001706104969_en-us_topic_0000001398642140_screen964739124513">drop table if exists `categories`;
|
|
CREATE TABLE IF NOT EXISTS `categories`
|
|
(
|
|
`CategoryID` tinyint(5) unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
`CategoryName` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '' ,
|
|
`Description` mediumtext CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL ,
|
|
`Picture` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
|
|
UNIQUE (`CategoryID`)
|
|
)ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
|
|
drop table if exists `categories`;</pre>
|
|
<p id="EN-US_TOPIC_0000001772696184__en-us_topic_0000001706104969_en-us_topic_0000001398642140_p981414459"><strong id="EN-US_TOPIC_0000001772696184__en-us_topic_0000001706104969_en-us_topic_0000001398642140_b843718195457">Output</strong></p>
|
|
<pre class="screen" id="EN-US_TOPIC_0000001772696184__en-us_topic_0000001706104969_en-us_topic_0000001398642140_screen1156413104513">DROP TABLE IF EXISTS "public"."categories";
|
|
CREATE TABLE IF NOT EXISTS "public"."categories" (
|
|
"categoryid" SMALLSERIAL NOT NULL PRIMARY KEY,
|
|
"categoryname" VARCHAR(60) NOT NULL DEFAULT '',
|
|
"description" TEXT NOT NULL,
|
|
"picture" VARCHAR(200) NOT NULL DEFAULT ''
|
|
) WITH (ORIENTATION = ROW, COMPRESSION = NO) NOCOMPRESS DISTRIBUTE BY HASH ("categoryid");
|
|
DROP TABLE IF EXISTS "public"."categories";</pre>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_16_0119.html">Table (Optional Parameters and Operations)</a></div>
|
|
</div>
|
|
</div>
|
|
|