久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

創建非唯一索引時的唯一索引錯誤 - SQL Server

Unique Index Error when creating non-unique index - SQL Server(創建非唯一索引時的唯一索引錯誤 - SQL Server)
本文介紹了創建非唯一索引時的唯一索引錯誤 - SQL Server的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我嘗試對 SQL Server 2005 中的表創建非唯一索引.嘗試創建它時出現以下錯誤.

I trying to and a non-unique index to a table table in SQL Server 2005. I am getting the following error when I try to create it.

消息 1505,級別 16,狀態 1,第 1 行CREATE UNIQUE INDEX 語句終止,因為找到了對象名稱dbo.oe_pick_ticket"和索引名稱idx_pick_ticket_popup_wmms"的重復鍵.重復鍵值為 (1093066, N, N, N, , FBF, 100001, 1074359, 1118930).

Msg 1505, Level 16, State 1, Line 1 The CREATE UNIQUE INDEX statement terminated because a duplicate key was found for the object name 'dbo.oe_pick_ticket' and the index name 'idx_pick_ticket_popup_wmms'. The duplicate key value is (1093066, N, N, N, , FBF, 100001, 1074359, 1118930).

我的create語句如下:

My create statement is as follows:

CREATE NONCLUSTERED INDEX idx_pick_ticket_popup_wmms 
ON oe_pick_ticket (invoice_no, delete_flag, direct_shipment, auxiliary, oe_pick_ticket_type_cd, company_id, location_id, order_no)

我嘗試重建聚集/唯一/主鍵索引,但沒有任何改變.有誰知道我為什么會收到此錯誤以及如何解決它?

I have tried rebuilding the clustered/unique/primary key index and that didn't change anything. Does anyone know why I am getting this error and how to resolve it?

推薦答案

事實證明,我能夠自己解決這個問題.我在桌子上運行了一個 DBCC CHECKTABLE,結果不一致.之后,我使用 REBUILD_REPAIR 選項再次運行它并修復了主鍵不一致的問題.

It turns out that I was able to figure this out on my own. I ran a DBCC CHECKTABLE on the table and there was an inconsistency. After that I ran it again with the REBUILD_REPAIR option and it fixed the primary key inconsistency.

這篇關于創建非唯一索引時的唯一索引錯誤 - SQL Server的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Converting Every Child Tags in to a Single Column with multiple Delimiters -SQL Server (3)(將每個子標記轉換為具有多個分隔符的單列-SQL Server (3))
How can I create a view from more than one table?(如何從多個表創建視圖?)
Create calculated value based on calculated value inside previous row(根據前一行內的計算值創建計算值)
How do I stack the first two columns of a table into a single column, but also pair third column with the first column only?(如何將表格的前兩列堆疊成一列,但也僅將第三列與第一列配對?) - IT屋-程序員軟件開發技
Recursive t-sql query(遞歸 t-sql 查詢)
Convert Month Name to Date / Month Number (Combinations of Questions amp; Answers)(將月份名稱轉換為日期/月份編號(問題和答案的組合))
主站蜘蛛池模板: 久久在线 | 爱福利视频 | 日韩一级av毛片 | 在线午夜视频 | 日韩av免费在线观看 | 精品国产视频 | 特一级黄色片 | 国产精品久久久久久久久久久久久久久 | 久久精品99 | 亚洲国产成人av | 师生出轨h灌满了1v1 | 丁香色婷婷| 中文字幕无人区二 | 国产又色又爽又黄又免费 | 日本美女一级片 | 精品第一页 | 日韩精品在线观看视频 | 午夜在线国语中文字幕视频 | 久久久精品一区二区 | 日日夜夜综合 | 日韩在线毛片 | 久久久久久综合 | 色日韩| 久久99热这里只频精品6学生 | 成人福利网站 | 蜜臀久久99精品久久久久宅男 | 日韩国产精品一区二区 | 99看片| 久久激情视频 | 日韩欧美在线观看 | 午夜黄色大片 | 久久久黄色片 | 97成人在线 | 99热这里都是精品 | 国产精品自拍小视频 | 亚洲第一区视频 | 亚洲欧美日韩一区二区三区四区 | 伊人操 | 国产亚洲一区二区三区 | 三级黄视频 | 天堂资源网|