程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> SyBase數據庫 >> SyBase綜合文章 >> usage of bcp command.(快來看)。

usage of bcp command.(快來看)。

編輯:SyBase綜合文章
這個是我從Manual上copy下來的,希望對大家有用。

bcp
Description
Copies a database to or from an Operating system file in a user-specifIEd format.
Syntax
bcp [[database_name.]owner.][vIEw_name | table_name [:partition_id]] {in | out} datafile[-c] [-E] [-n] [-X]
[-a display_charset]
[-A size]
[-b batchsize]
[-e errfile]
[-f formatfile]
[-F firstrow]
[-g id_start_value]
[-I interfaces_file]
[-J clIEnt_charset]
[-L lastrow]
[-m maxerrors]
[-P passWord]
[-q datafile_charset]
[-r row_terminator]
[-R remote_server_principal]
[-S server]
[-t fIEld_terminator]
[-T text_or_image_size]
[-U username]
[-z language]
or
bcp -v
Parameters
database_name
is optional if the table being copIEd is in your default database or in master. Otherwise, you must specify a database name.
owner
is optional if you or the Database Owner owns the table being copIEd. If you do not specify an owner, bcp looks first for a table of that name that you own, and then looks for one owned by the Database Owner. If another user owns the table, you must specify the owner name or the command fails.
vIEw_name
is the name of the vIEw you are copying out.
table_name
is the name of the database table to copy.
Partition number partition_number does not exist in table table_name.
partition_id
is the identifIEr of the partition into which to copy.
in | out
is the direction of the copy. in indicates a copy from a file into the database table; out indicates a copy to a file from the database table or vIEw.
datafile
is the full path name of an Operating system file. The path name can be from 1 to 255 characters in length.
-c
performs the copy Operation with char datatype as the default. This parameter does not prompt for each field; it uses char as the default storage type, no prefixes, \t (tab) as the default fIEld terminator, and \n (newline) as the default row terminator.
-E
explicitly specifIEs the value of a table's IDENTITY column.
By default, when you bulk copy data into a table with an IDENTITY column,
  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved