isql的详细用法

[复制链接]
查看11 | 回复3 | 2011-2-18 11:43:33 | 显示全部楼层 |阅读模式
最好能有个详细的例子,isql是不是可以把磁盘上的一个文件,比如里面都是insert 脚本 直接执行,导入到数据中去。
回复

使用道具 举报

千问 | 2011-2-18 11:43:33 | 显示全部楼层
1,先看看isql的帮助:
isql: unknown option ?
usage: isql       [-U login id]     [-P password]
 [-S server]      [-H hostname]     [-E trusted connection]
 [-d use database name] [-l login timeout]   [-t query timeout]
 [-h headers]      [-s colseparator]   [-w columnwidth]
 [-a packetsize]    [-e echo input]    [-x max text size]
 [-L list servers]   [-c cmdend]
 [-q "cmdline query"]  [-Q "cmdline query" and exit]
 [-n remove numbering] [-m errorlevel]
 [-r msgs to stderr]
 [-i inputfile]     [-o outputfile]
 [-p print statistics] [-b On error batch abort]
 [-O use Old ISQL behavior disables the following]
    batch processing
   Auto console width scaling
   Wide messages
   default errorlevel is -1 vs 1
 [-? show syntax summary (this screen)]

2. 下面的命令可以执行事先准备好的包含t-sql语句的文件:
isql -S SQLSVR -U userID -P password -i sqlfile
or
isql -S SQLSVR -U userID -P password < sqlfile
回复

使用道具 举报

千问 | 2011-2-18 11:43:33 | 显示全部楼层
可以用命令行方式批处理一些sql
回复

使用道具 举报

千问 | 2011-2-18 11:43:33 | 显示全部楼层
好的,非常感谢,偶去试试了,不知道在isql里面可否进行类型转换呢。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行