MS SQL SERVER 图像或大文本的输入输出

2016-01-29 16:28 8 1 收藏

MS SQL SERVER 图像或大文本的输入输出,MS SQL SERVER 图像或大文本的输入输出

【 tulaoshi.com - SQLServer 】

 

在MS SQL SERVER 安装目录下有个可执行文件叫 TEXTCOPY.EXE
可对 MS SQL SERVER 中的文本或图像数据进行输入输出.
不过你可以在MS-DOS方式下执行textcopy /? 得到它的描述。
下面是这个工具的描述:
Copies a single text or image value into or out of SQL Server. The val
ue
is a specified text or image 'column' of a single row (specified by th
e
"where clause") of the specified 'table'. 

If the direction is IN (/I) then the data from the specified 'file' is

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/sqlserver/)

copied into SQL Server, replacing the existing text or image value. If
the
direction is OUT (/O) then the text or image value is copied from
SQL Server into the specified 'file', replacing any existing file.

TEXTCOPY [/S ][sqlserver]] [/U [login]] [/P ][password]]
  [/D ][database]] [/T table] [/C column] [/W"where clause"]
  [/F file] [{/I | /O}] [/K chunksize] [/Z] [/?]

  /S sqlserver       The SQL Server to connect to. If 'sqlserver' is n
ot
                     specified, the local SQL Server is used.
  /U login           The login to connect with. If 'login' is not spec
ified,
                     a trusted connection will be used.
  /P password        The password for 'login'. If 'password' is not
                     specified, a NULL password will be used.
  /D database        The database that contains the table with the tex
t or
                     image data. If 'database' is not specified, the d
efault
                     database of 'login' is used.
  /T table           The table that contains the text or image value.

  /C column          The text or image column of 'table'.
  /W "where clause"  A complete where clause (including the WHERE keyw
ord)
                     that specifies a single row of 'table'.
  /F file            The file name.
  /I                 Copy text or image value into SQL Server from 'fi
le'.
  /O                 Copy text or image value out of SQL Server into '
file'.
  /K chunksize       Size of the data transfer buffer in bytes. Minimu
m
                     value is 1024 bytes, default value is 4096 bytes.

(本文来源于图老师网站,更多请访问https://www.tulaoshi.com/sqlserver/)

  /Z                 Display debug information while running.
  /?                 Display this usage information and exit.

You will be prompted for any required options you did not specify.

为此, 可写一个存储过程,调用这个命令
CREATE PROCEDURE sp_textcopy (
  @srvname     varchar (30),
  @login       varchar (30),
  @password    varch

来源:https://www.tulaoshi.com/n/20160129/1498700.html

延伸阅读
import java.util.*; import java.io.*; /**  * pTitle: 标注输入输出/p  * pDescription: 接收标准的键盘输入,和输出到屏幕。/p  * pCopyright: Copyright (c) 2003/p  * pFilename: standerdIO.java/p  * @version 1.0  */ public class standerdIO{ /**  *br方法说明:主方法  *br输入参数:...
(四)查询多个表格 在对跨多个表格的数据进行组合时,有时很难搞清楚要使用哪一个SQL句法。我将在这里对将多个表格中的查询合并至单一声明中的常用方式进行阐述。 在这篇文章中的样本查询符合SQL92 ISO标准。不是所有的数据库生产商都遵循这项标准,而且很多厂商采取的提升措施会带来一些意料不到的后果。如果你不确定你的数据库...
(二) SELECT语句选项 跟我学SQL分为三部分,其中涵盖了有关SQL标准的基本知识。在上一篇文章里我们讨论了一些数据库术语和4种最基本的数据查询类型。此外,我们还解释了WHERE子句和条件语句的用法,同时我们提供了各类查询的具体示例。 在这篇文章里,我们将就其他一些SQL函数和子句进行阐述,供你用于基本的SELECT数据查询中。 ...
(六)串行数据类型 SQL的数据类型决定了一个字段的内容在数据库中会被如何处理、存储和显示。SQL92定义了标准的数据类型,目的是给数据库制造商建立自己的数据类型提供蓝图。在前面的文章中,我们介绍了一些常用的数据类型,这些数据类型分为四大类: 串行 数值 日期时间 区间型 本文将向你概述这些数据类型...
(三)用SQL来合并查询 你是否曾经为了得到所需要的信息而反复查询?子选择,也被称为子查询,也许正是你在寻找的。SQL的这项功能使你可以在一组结果中查询,创造性地给结果组加以限定,或是在向数据库的单一调用中将结果与一个无关系的查询做相关。这篇文章中我将给出几个子选择的例子并就何时使用他们进行讨论。 在一个结果组中...

经验教程

58

收藏

84
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部