User Guide > Procedures > Packaged Queries > DDL Support in Packaged Queries
 
パッケージ化されたクエリでのDDLサポート
パッケージ化されたクエリでDDLステートメントを実行できます。パッケージ化されたクエリは、ネイティブクエリ構文に従う必要があることに注意してください。 DDLステートメントが実行された後、データソースのイントロスペクションは自動的に実行されません。データソースを右クリックし、[リソースの追加と削除]を選択して、データソースを手動でイントロスペクトします。
Note: Packaged Queries must have an OUT parameter which is a cursor with at least one column. Click on the parameters tab of the packaged query and define the result cursor using the Design by Example option, before executing your packaged query.
Following are examples of the DDL syntax in a Packaged query. Refer to the section Multiple SQL Execution Statements in a Packaged Query to understand the usage of the multipartseparator used in the examples below.
例1
以下は、ds_ordersデータソースで作成されたパッケージクエリでのDDLの使用例です。
<version 2> multipartseparator=;+;
存在しない場合はテーブルを作成tutorial.myorders
選択として*
fromtutorial.ordersから
; ;
tutorial.myordersから*を選択します
例2
The following packaged query example shows the syntax to create a table that is defined based on an S3 file in the path s3a://customers/northbay/
csvオプションを使用してテーブル `myTable_csv`を作成します(パス 's3a://customers/northbay/myTable.csv'、ヘッダー 'true')
なので
SELECT
*
FROM
VALUES(CAST(0 AS INTEGER))
AS( `col`)
WHERE
1 = 0