Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 冲浪宝典 > 网络资源 > update& unique index
【标  题】:update& unique index
【关键字】:update,unique,index
【来  源】:http://www.cublog.cn/u/20140/showart.php?id=203666

update& unique index

Your Ad Here

SQL> create table t( x int,y int);
Table created.

SQL> insert into t values(1,1);
1 row created.
SQL> insert into t values(1,2);
1 row created.

SQL> create unique index u_t on t(x,y);
Index created.
SQL> commit;
Commit complete.
SQL> insert into t values(1,3);
1 row created.
SQL> insert into t values(1,3);
insert into t values(1,3)
*
ERROR at line 1:
ORA-00001: unique constraint (THE9.U_T) violated

SQL> update t set y=2 where x=1;
update t set y=2 where x=1
*
ERROR at line 1:
ORA-00001: unique constraint (THE9.U_T) violated

SQL> update t set y=2 where x=1 and y=2;
1 row updated.
SQL> rollback;
Rollback complete.
SQL> select * from t;
         X          Y
---------- ----------
         1          1
         1          2
SQL> update t set x=1 where y=2;
1 row updated.
SQL>
存储过程定时执行:【上一篇】
ORA-01480: STR赋值变量缺少空后缀:【下一篇】
【相关文章】
  • Bitmap index的初始化参数
  • Expert one-on-one oracle(chapter 7:indexes)
  • http://www.cnpaf.net/Class/hack/index.html
  • 违反并发性: UpdateCommand影响了预期 1 条记录中的 0 条
  • 在RedHat Advanced Server 4.0 update1上安装Oracle Database 10g Release 2 (10.2.0.1)
  • SUS(Software Update Services) Deployment
  • Updater Application Block实践
  • 关天asp.net ajax beta中在updatepnael中注册脚本的解决方案
  • Some update information about Office 2007
  • 关注AJAX(4):ComponentArt,母板页和定制UpdateProgress
  • 【随机文章】
  • 治疗过敏性鼻炎就选圣美安
  • 提高IIS 5.0网站伺服器的执行效率的八种方法
  • SQL Server事务日志的处理方法
  • log4j简明文档
  • C#将文本文件保存为Word文件或Excel文件
  • PHOTOSHOP小技巧(7)
  • linux系统信息
  • VB 6中透明窗体的制作
  • 基于B/S 架构的应用软件的简单注册方法(VB.NET)
  • Cisco发布新的专家资格认证
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.