print リレーション名
\g
\p
\r
range of 変数名 is リレーション名
\g
retrieve (項目リスト) where 検索条件
\g
retrieve into 出力リレーション名 (項目リスト) where 検索条件
\g
retrieve unique (項目リスト) where 検索条件
\g
注1) 項目リスト リレーション名.項目名,...
リレーション名.all
項目名 = 式,...
注2) 検索条件 論理演算子 and , or , not
条件演算子 = , != , > , >= , < , <=
左/右辺値 式
文字列
* 任意の文字列
? 空白以外の任意の1文字
[] 文字列リスト
最大検索条件長=255バイト
注3) unique 先頭項目順にソート後、重複タプルを除いて出力する
注4) 数値演算子 + , - , / , * , **
関数 abs(n)
ascii(n)
atan(n)
concat(str1,str2)
cos(n)
exp(n)
gamma(n)
log(n)
mod(n,b)
sin(n)
sqrt(n)
count(n)
countu(n)
sum(n)
sumu(n)
avg(n)
avgu(n)
max(n)
min(n)
any(n)
help リレーション名
\g
注1) リレーション名省略時はリレーション一覧表示
replace リレーション名 (項目リスト) where 検索条件
\g
注1) 項目リスト 項目名 = 式,...
delete リレーション名 where 検索条件
\g
append リレーション名 (項目リスト) where 検索条件
\g
注1) 項目リスト 項目名 = 式,...
copy リレーション名 (項目名=フォーマット,...) into "ファイル名"
\g
注1) フォーマット i1,i2,i4
f4,f8
c1,...c255
c0x
区切り文字 x = nl
tab
sp
nul
comma
colon
dash
lparen
rparen
任意の1文字
注2) 推奨パターン (item1=c0comma,item2=c0comma,...,itemn=c0nl)
copy リレーション名 (項目名=フォーマット,...) from "ファイル名"
\g
注1) フォーマット i1,i2,i4
f4,f8
c0x
c1,...,c255
d0x 読み飛ばし可変長文字列
d1,...,d255 読み飛ばし固定長文字列
区切り文字 x 省略時 comma,tab,nl
注2) 推奨パターン (item1=c0,item2=c0,...,itemn=c0)
create リレーション名 (項目名=フォーマット,...)
\g
注1) DBA以外のユーザが作成したリレーションは作成ユーザしかアクセ
ス出来ない。
DBAが作成したリレーションは define permit コマンドにより他の
ユーザにアクセス権を与えることが出来る。
define view ビュー名 (ターゲットリスト) where 結合条件
\g
注1) ターゲットリスト 項目名=式
リレーション名.項目名
例) seikyudaityo : tcode , seikyu , syuno
tokuisaki : tcode , namae , jusyo
↓
minoitiran : tcode , name , jusyo , seikyu , syuno , mino
range of s is seikyudaityo
range of t is tokuisaki
define view minoitiran (
t.tcode,
t.name,
t.jusyo,
s.seikyu,
s.syuno,
mino = s.seikyu - s.syuno
) where s.tcode = t.tcode and s.syuno < s.seikyu
\g
define permit オペレーション on リレーション名 to ユーザ名
of all
where 範囲条件
\g
注1) オペレーション retrieve
replace
delete
append
all
注2) 本コマンドは DBA のみが実行できる。
define integrity on リレーション名 is 条件
\g
destroy リレーション名
\g
index on リレーション名 is 2次キーリレーション名 (項目名,...)
\g
modify リレーション名 to heap
\g
modify リレーション名 to hash on キー項目名
\g
modify リレーション名 to isam on キー項目名
\g
save リレーション名 until mm dd yyyy
\g
注1) 最大満期日 : 12 31 2035