logo
  • 教程列表
  • SO官方文档
  • 索引
    • 创建索引
    • 群集唯一和排序索引
    • 排序索引
    • 删除索引或禁用并重建它
    • 部分或过滤指数
    • 插入唯一索引
    • 重建索引
    • SAP ASE Drop 索引
    • 允许 NULLS 的唯一索引
    • 聚集索引
    • 非聚集索引
  1. StackOverflow 文档
  2. SQL 教程
  3. 索引
  4. 插入唯一索引

插入唯一索引

Created: November-22, 2018

UPDATE Customers SET Email = "richard0123@example.com" WHERE id = 1;

如果在 Customers 的“ 电子邮件” 列上设置了唯一索引,则会失败。但是,可以为此情况定义备用行为: **

UPDATE Customers SET Email = "richard0123@example.com" WHERE id = 1 ON DUPLICATE KEY; 
  • 重建索引
  • 部分或过滤指数

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明