bcp DBNAME.dbo.TABNAME out DEMO.TXT -eERR.TXT -n -SSERVERNAME -k -PPASSWORD
Example:bcp wyyy.dbo.zgzb out zgzb.txt -eErr.txt -n -Snt2000 -k -Ufounder -Pfd
//导出bcp DBNAME.dbo.TABNAME in DEMO.TXT -eERR.TXT -n -SSERVERNAME -k -PPASSWORD
Example:bcp wyyy.dbo.zgzb out zgzb.txt -eErr.txt -n -Snt2000 -k -Ufounder -Pfd
//导入

解决方案 »

  1.   

    to belllab(bell)
    Line 1: Incorrect syntax near '.'.
    这是什么错误?我怎么都找不到哪里有点,用的是你的例子。
      

  2.   

    导出
    bcp master..a out a.txt -U sa -P -S server -c -t,master为对应库名 a为表名 -U 后的sa为用户名 -P后为密码 -S后为服务器名 -c为文件存放格式,-t后的,表示用,隔开各字段
      

  3.   

    还是不行啊,高手们bcp是什么东西啊
      

  4.   

    bcp应该是:bulk copy program bcp is a command prompt utility. bcp provides for running bulk copies in .bat and .cmd scripts. bcp is used to bulk copy large files into tables or views in SQL Server databases. For more information, see bcp Utility看一下SQL Server Books OnLine
    帮助