Skip to content

Instantly share code, notes, and snippets.

@tamata78
Created April 16, 2020 05:58
Show Gist options
  • Save tamata78/f013b74cb0e536efeadd810b53aea487 to your computer and use it in GitHub Desktop.
Save tamata78/f013b74cb0e536efeadd810b53aea487 to your computer and use it in GitHub Desktop.
SQLコマンドライン実行

Oracle sqlplus

echo "select * from dual;"  | sqlplus ユーザー/パスワード@接続文字列
sqlplus ユーザー/パスワード@接続文字列 @c:\sqmple.sql

MySQL mysql

mysql -uユーザー -pDBパスワード DB名 -e SQLファイル名
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment