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

創(chuàng)建非唯一索引時的唯一索引錯誤 - SQL Server

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

問題描述

我嘗試對 SQL Server 2005 中的表創(chuàng)建非唯一索引.嘗試創(chuàng)建它時出現(xiàn)以下錯誤.

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,狀態(tài) 1,第 1 行CREATE UNIQUE INDEX 語句終止,因為找到了對象名稱dbo.oe_pick_ticket"和索引名稱idx_pick_ticket_popup_wmms"的重復(fù)鍵.重復(fù)鍵值為 (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,結(jié)果不一致.之后,我使用 REBUILD_REPAIR 選項再次運行它并修復(fù)了主鍵不一致的問題.

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.

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

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

相關(guān)文檔推薦

Converting Every Child Tags in to a Single Column with multiple Delimiters -SQL Server (3)(將每個子標(biāo)記轉(zhuǎn)換為具有多個分隔符的單列-SQL Server (3))
How can I create a view from more than one table?(如何從多個表創(chuàng)建視圖?)
Create calculated value based on calculated value inside previous row(根據(jù)前一行內(nèi)的計算值創(chuàng)建計算值)
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屋-程序員軟件開發(fā)技
Recursive t-sql query(遞歸 t-sql 查詢)
Convert Month Name to Date / Month Number (Combinations of Questions amp; Answers)(將月份名稱轉(zhuǎn)換為日期/月份編號(問題和答案的組合))
主站蜘蛛池模板: 成人在线视频观看 | 免费一看一级毛片 | www,黄色,com | 孕妇一级毛片 | 国产一区二区日韩 | 国产小视频在线观看 | 欧美精品第一区 | 成人性生交a做片 | aaa在线观看 | 99精品网 | 久久久不卡网国产精品一区 | 日韩视频在线免费观看 | 日韩国产三区 | 色综合久久天天综合网 | 国产精品免费看 | 精品不卡 | 亚洲欧美日韩电影 | 国产精品一区二区三区四区五区 | 日本国产精品视频 | 亚洲激情自拍偷拍 | 国产精品久久久久久久久图文区 | 国产激情网站 | 欧美成人精品二区三区99精品 | 国产福利91精品 | 国内精品久久影院 | 久久精品久久久久久 | 精品在线观看入口 | 在线一区视频 | 欧美韩一区二区三区 | 国产精品亚洲综合 | 亚洲三区视频 | 99re超碰| 在线中文字幕日韩 | 99精品一区二区 | 偷拍自拍在线观看 | 国产精品一级 | 亚洲一区二区三区高清 | 亚洲在线一区二区 | 欧美在线a | 亚洲成人高清 | 五月激情综合 |