SQLSTATE代码和消息(sybase)

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

SQLSTATE代码和消息

 

警告

需要用户用户注意但尚未严重妨碍SQL语句成功执行的情况

例外

使用SQL语句无法对数据库产生影响的情况

 

SQLSTATE代码存储在sysmessages系统表中

 

 

 

消息

中文解释

发生条件

警告

 

 

Warning-null value eliminated in set funcation

警告-set函数中的NULL值已经消除

对具有NULL值的表达式使用集合函数(avg/max/min/sum/count)时会出现此信息

Warning-string data,right truncation

警告-字符串数据,右截断

将字符,unichar或二进制数据截断为255字节时会出现此信息.

 

 

 

基数冲突

 

 

Subquery returned more than 1value.this is illegal when the subquery follow =,!=,<,<=,>=,or when the subquery is user as an expression

子查询返还不止一个值,当子查询跟在=,!=,<之后或者当子查询用作表达式时,这种情况是非法的

标量子查询或行子查询返回不止一行

 

 

 

数据例外

 

 

Arithmetic overflow occurred

发生算术溢出

算术运算或SUM函数,以及截断,舍入使精确数值类型丢失精度或标度

Data exception-string data right truncated

数据例外-字符串从右侧被截断

列太短,不能容纳插入或更新的数据,而必须截断非空字符.

Divide by zero occurred

发生零除错误

对数字表达式求值而除数的值为零

Illegal escape character found.There are fewer bytes than necessary  to form a valid character

发现非法的转义字符,形成有效字符所需的字节数不过.

在转义序列不是由单个字符构成时,搜索与给定模式相匹配的字符串.

Invalid pattern string.The character following the escape character must be percent sign ,underscore ,left square bracket, right square bracket, or the escape character.

无效的模式字符串.转义字符后的字符必须是百分号,下划线,左方括号,右方括号或转义字符

搜索与特定模式相匹配的字符串时.

 

 

 

完整性约束冲突

Insert,updatedelete语句与primary key ,foreign key .checkunique约束或唯一索引发生冲突.

Attempt to insert duplicate key row in object_name with unique index index_name

试图在具有唯一索引index_name的对象object_name中插入重复的键行

在具有唯一约束或索引的表中插入重复的行.

Check constraint violation occurred ,daname=database_name,table name=table_name,constraint name=constraint_name.

发生检查约束冲突

Updatedelete与列的检查约束发生冲突.

Dependent foreign key constraint violation in a referential integrity constraint

参照完整性约束中发生相关外键约束冲突.

主键表上的updatedelete与外键约束发生冲突.

Foreign key constraint violation occurred,

发生外键约束冲突

在主键表中无匹配值的情况下对外键表执行insertupdate

 

 

 

无效的游标状态

 

 

Attempt to use cursor cursor_name which is not open.Use the system stored procedure sp_cursorinfo for more information.

试图使用未打开的游标cursor_name.有关详细信息,请使用系统存储过程sp_cursorinfo

试图从未打开或已被commit语句或者隐式(或显式)rollback关闭的游标中进行读取.重新打开游标并重新执行fetch

Cursor cursor_name was closed implicitly because the current cursor position was deleted due to an update or a delete.The cursor scan position could not be recovered.This happens for cursors which reference more than one table.

由于当前游标位置因执行update delete而被删除,因此游标cursor_name被隐式关闭.

多表游标的连接已被删除或更改.发出另一个fetch以重新定位游标.

 

 

 

语法错误和访问规则冲突

 

 

Command permission denied on object object_name,database database_name,owner  owner_name

对象object_name,数据库database_name,所有者owner_name上的command权限被拒绝.

用户试图访问他们没有正确权限的对象.

Implicit  conversion from datatype ‘datatype’ to ‘datatype’ is not allowed.Use the convert function to run this query.

不允许执行从数据类型‘datatype’‘datatype’的隐式转换.请使用convert函数来运行该查询.

用户试图将一种数据类型转换为另一种数据类型.

Incorrect syntax near object_name

object_name附件有语法错误

在指定对象附近发现错误的SQL语法.

Insert error:column name or number of supplied values does not match table definition

插入错误:列名或所提供值的数量与表定义不匹配.

插入时使用了无法的列名或插入的值的个数不正确.

Missing end comment mark’*/’

缺少结束注释符’*/’

/*开始的注释

Object_name not found.Specify owner.objectname or use sp_help to check whether the object exists .

未找到Object_name,指定owner.objectname或使用sp_help检查对象是否存在.

用户试图引用他们不具有权限的对象.

The size given to the object_name exceeds the maximum.The largest size allowed is size.

object_name指定的大小超出最大值.允许最大值为size

表定义中所有列的大小总和超出行大小允许的最大允许值.

Your server command was deadlocked with another process and has been chosen as deadlock victim

你的服务器命令与另一进程发生死锁并且被选作死锁的牺牲品.

检测到它无法保证两个或两个以上的并发事务可以序列化.

 

 

 

With check option

 

 

The attempted insert or update failed because the target view was either created with check option or spans another view created with check iption.

插入或更新尝试失败,原因是目标视图使用With check option创建的或者跨越了另一个用With check option创建的视图

视图或视图所依赖的任何视图是用With check option子句创建的.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

转载于:https://www.cnblogs.com/zyl-8183/archive/2006/12/25/603393.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值