Sybase IQ Insert location使用
1 命令介紹
INSERT [INTO] [owner.]table-name[ (column-name [, ... ] ) ]
... insert-load-options
[ LOCATION 'servername.dbname'
[ location-options ] ]
... { select-statement }
【參數說明】
insert-load-options
[ LIMIT number-of-rows ]:The LIMIT option specifies the maximum number of rows to insert into the table from a query. The default is 0 for no limit. The maximum is 2GB -1.指定插入的最大的行數。 www.2cto.com
[ NOTIFY number-of-rows ]:The NOTIFY option specifies that you be notified with a message each time the number of rows are successfully inserted into the table. The default is every 100,000 rows. 每次插入時都有消息提示,默認是100,000行提示一次。
[ SKIP number-of-rows ]:The SKIP option lets you define a number of rows to skip at the beginning of the input tables for this insert. The default is 0.忽略幾行開始插入
[ START ROW ID number ]:The START ROW ID option specifies the record identification number of a row in the IQ table where it should start inserting. This option is used for partialwidth inserts, which are inserts into a subset of the columns in the table. By default, new rows are inserted wherever there is space in the table, and each insert starts a new row。
location-options
[ ENCRYPTED PASSWORD ]:
[ PACKETSIZE packet-size ]:The PACKETSIZE parameter specifies the TDS packet size in bytes. The default TDS packet size on most platforms is 512 bytes. If your application is receiving large amounts of text or bulk data across a network, then a larger packet size might significantly improve performance.
[ QUOTED_IDENTIFIER { ON | OFF } ]
【例子】
INSERT INTO lineitem
(shipdate, orderkey)
LOCATION 'detroit.asiqdb'
PACKETSIZE 512 www.2cto.com
' SELECT shipdate, orderkey
FROM lineitem '
【說明】:Inserts data from the shipdate and orderkey columns of the lineitem
table from the Sybase IQ 11.5 database asiq11db.dba on the server detroit,
into the corresponding columns of the lineitem table in the current
database。把遠端數據庫的表插入到本地
【注意問題】
Enter the remote server database name in the directory services (interfaces) file—interfaces文件中必須加上server的名字
建立server是必須有DBA的權限
You can insert a maximum of 2147483647 rows.
You cannot use unsigned integer data.
作者 housheng33