input

说明

从外部文件或键盘将数据导入数据库表中。

语法

input into [ owner.]table-name
[ from filename | prompt]
[ format input-format ]
[ escape character character ]
[ escapes { on | off }
[ by order | by name ]
[ delimited by string ]
[ column widths (integer , . . . ) ]
[ nostrip ]
[ ( column-name, . . . ) ]
[ encoding encoding ]
input-format :
ascii | dbase | dbasell| dbaselll
| excel | fixed | foxpro | lotus 
encoding : identifier or string 

参数

encoding – 允许指定用于读取文件的编码。encoding 只能用于 ASCII 格式。

如果未指定 encoding,Interactive SQL 将按如下方式确定用于读取文件的代码页,列表中位置靠前的代码页值优先于位置靠后的值:

示例

这是 ASCII 文本文件中的 input 语句示例:

input into employee
from new_emp.inp
format ASCII 

用法

权限

必须具有表或视图的 insert 权限。

副作用

无。