Published on InterSystems Developer Community (https://community.intersystems.com)

ホーム > ターミナルでSQLを実行する方法

記事
Hiroshi Sato · 2021年10月27日 1m read

ターミナルでSQLを実行する方法

これは、InterSystems FAQサイトの記事です。

$system.SQL.Shell() を使用します。

以下にサンプルを示しますので参考にしてください。

 

SAMPLES>do $System.SQL.Shell()
SQL Command Line Shell
---------------------------------------------------- The command prefix is currently set to: <>.
Enter q to quit, ? for help.
SAMPLES>>select * from Sample.Vendor
1. select * from Sample.Vendor Vendor Balance Contact DaysClear DiscDays DiscRate LastInvDate LastPayDate MinPayment Name NetDays PayFlag TaxReportingAddress_City Address_State Address_Street Address_Zip
: ※最初の行で何も入力せずにEnterを押すと、複数行入力モードに切り替わります。
USER>d $SYSTEM.SQL.Shell()
SQL Command Line Shell
----------------------------------------------------
Enter q to quit, ? for help.
USER>> << entering multiline statement mode, 'GO' to execute >>
1>>set transaction isolation level read committed
2>>go

 

詳細は、以下ドキュメントをご参照ください。

 
SQLShellの使い方について【IRIS】
SQLShellの使い方について

#ヒントとコツ #Caché #Ensemble #InterSystems IRIS #InterSystems IRIS for Health

ソースURL:https://jp.community.intersystems.com/post/%E3%82%BF%E3%83%BC%E3%83%9F%E3%83%8A%E3%83%AB%E3%81%A7sql%E3%82%92%E5%AE%9F%E8%A1%8C%E3%81%99%E3%82%8B%E6%96%B9%E6%B3%95