Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1565979
  • 博文数量: 201
  • 博客积分: 2812
  • 博客等级: 少校
  • 技术积分: 3029
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-18 18:28
个人简介

从事数据库工作多年,目前看好分布式NeSQL/HTAP数据库在企业客户市场的发展。未来的主要方向是——致力于 NewSQL/HTAP 数据库的推广普及。

文章存档

2016年(1)

2015年(8)

2014年(23)

2013年(50)

2012年(32)

2011年(87)

分类: Sybase

2011-09-14 17:03:28

   最近遇到一个问题,有个用户需要使用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;
阅读(1840) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~