SQL: May 2011 Archives

FreeTDS tsql

Vote 0 Votes

FreeTDS 裝好後, 有一個 tsql 指令, 相當於 MSSQL 的 sqlcmd

tsql -S server -U username -P password -D database
(server 定義在 freetds.conf, [] 內的名稱)

1> select * from table
2> go

記得要下 go 才會開始查詢, 離開用 exit 或 quit

也可以用 | 寫成一行批次執行
printf "select * from table\ngo\n" | tsql -S server -U username -P password -D database

About this Archive

This page is an archive of entries in the SQL category from May 2011.

SQL: December 2010 is the previous archive.

SQL: July 2011 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives