返回首页

gbase数据、南大通用产品文档:GBase8c

更新日期:2024年09月11日

相关命令
gs_dump,gs_restore

GBase 8c 工具参考手册
南大通用数据技术股份有限公司
153

SQLForeignKeys 返回外键列表。
SQLForeignKeys 返回以下任一一项:
l
指定表中外键列表(指定表中的指向其它表中主键的列)
l
其它表中引用指定表中主键的外键列表
驱动程序将返回每个列表作为在指定的 hstmt 上设置的结果。
下表描述了 SQLForeignKeys 的 SQLSTATE 和错误值。
SQLSTATE
错误值
错误消息
01000
-11001
General warning
08S01
-11020
Communication link failure
24000
-11031
Invalid cursor state
IM001
-11040
Driver does not support this function
S1000
-11060
General error
S1001
-11061
Memory allocation failure
S1008
-11065
Operation canceled
S1009
-11066
Invalid argument value
S1010
-11067
Function sequence error
S1090
-11071
Invalid string or buffer length

GBase 8s ODBC Driver 程序员指南
南大通用数据技术股份有限公司
- 226 -

SQLSTATE
错误值
错误消息
S1C00
-11092
Driver not capable
S1T00
-11094
Timeout expired
S1C00
-11300
SQL_DEFAULT_PARAM not supported
08S01
-11301
A protocol error has been detected. Current connection is
closed.
S1000
-11310
Create and Drop must be executed within a ServerOnly
Connection
S1000
-11320
Syntax error
S1000
-11323
The statement contained an escape clause not supported by
this database driver

函数说明
返回一个重复了count 次的字符串str 组成的字符串。
如果count<=0,
返回一个空
字符串;如果str 或count 是NULL,返回值为NULL。count 值范围为bigint。
示例
示例1:返回将“GBase”重复3 次后的字符串。
gbase> SELECT REPEAT('GBase', 3) FROM dual;
+--------------------+
| REPEAT('GBase', 3) |
+--------------------+
| GBaseGBaseGBase
|
+--------------------+
1 row in set
注意

若repeat(str , count) 中,str 所占用字节数*count > 16M,
请在集群配置文件中[gbased]栏增加max_allowed_packet
= 64M。
因为repeat 虽然允许单个最大元组为64M,但是客
户端默认配置max_allowed_packet 为16M,
会将大于16M
的内容拦截,并报错处理。