Load Table命令如何装载BLOB类型的数据

2076阅读 0评论2011-09-14 lion_sybiq_127
分类:Sybase

   最近遇到一个问题,有个用户需要使用load table往IQ数据库的表中装载blob数据。通过查找资料并做试验找到了一个方法。具体看看下面的例子吧:
 
--创建测试表
create table testimage(id int, name char(8), age tinyint, photo blob null)
 
--load数据文件 testimage.dat
1|!zhang|!30|!/tmp/file1.jpg|!
2|!wang|!39|!/tmp/file2.jpg|!
 
--load table语句
load table imagetest
(
  id '|!',
  name  '|!',
  age  '|!',
  photo binary file ('|!')
)
from '/sybiq/testiqdb/testimage.dat'
quotes off
escapes off;
上一篇:IQ 15中存储过程汉字注释乱码问题解决方法
下一篇:Sybase IQ 15 最佳实践(1)