首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > Informix >

带参数的sql语句,该怎么处理

2012-02-09 
带参数的sql语句1.table1(id,name)更新语句:update table1 set name? where id?因为这种参数格式不带参

带参数的sql语句
1.table1(id,name)
更新语句:update table1 set name=? where id=?;
因为这种参数格式不带参数名,这样参数值就得事先排序,操作起来很不方便。想问下有无带参数名的格式?

2.有谁知道locopy函数的用法。现在想更新blob字段,不知道大家用什么方法?

[解决办法]
LOCopy没用过,以下是我google来的。
LOCopy
This function creates a copy of a smart large object. 
Syntax
SQL
CREATE FUNCTION LOCopy (lob LLD_Lob)
RETURNS LLD_Lob ;

CREATE FUNCTION LOCopy (lob, LLD_Lob, table_name, CHAR(18), 
column_name, CHAR(18))
RETURNS LLD_Lob;
;
lob 
is a pointer to the smart large object to copy. 
table_name 
is a table name. This parameter is optional. 
column_name 
is a column name. This parameter is optional. 
Usage
This function is an overloaded version of the LOCopy built-in server function. This function is identical to the built-in version of the function, except the first parameter is an lld_lob type rather than a BLOB or CLOB type.

The table_name and column_name parameters are optional. If you specify a table_name and column_name, LOCopy uses the storage characteristics from the specified column_name for the new smart large object that it creates.

If you omit table_name and column_name, LOCopy creates a smart large object with system-specified storage defaults.

See the description of the LOCopy function in the IBM Informix: Guide to SQL Syntax for complete information about this function.

Return codes
This function returns a pointer to the new lld_lob value.

Context
LOCopy in the IBM Informix: Guide to SQL Syntax

热点排行