FreeTDS tsql

user-pic
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

Leave a comment

About this Entry

This page contains a single entry by Pank published on May 5, 2011 11:37 AM.

Enable Apache fancy directory listings was the previous entry in this blog.

zen.spamhaus.org is the next entry in this blog.

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

Monthly Archives