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

  • 關於本站
  • 免責聲明