本文適應於isql 11.*, 可通過isql -v得到版本
set nocount on
use pubs2
go
select "bcp pubs2.." + name + " out " + name + ".bcp -Usa -P -c "
from sysobjects where type="U"
go
isql -Usa -P -b -i select.sql -o bcpout
chmod +x bcpout
isql -Usa -P -b -i select.sql -o bcpout.bat