LoginSignup
4
4

More than 5 years have passed since last update.

UbuntuからSQL Serverを操作する

Posted at

UbuntuからSQL Serverを操作する場合

sqshを使う。

インストール方法

apt-get でインストールする。
x11-commonとか入れられてしまってちょっと気持ち悪い。

$ sudo apt-get install sash

使い方

コマンドライン引数で覚えるのは以下かな。
-S でサーバー名
-U でユーザー名
-P でパスワード

$ sqsh -S 192.168.1.2 -U sa -P password

プロンプト(行> という形式。1>のような)が出たらSQLを入力する。
実行させるにはgo。

1> use test
2> go
1> select * from test_table
2> go
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4