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

創(chuàng)建 SQL 身份作為主鍵?

Create SQL identity as primary key?(創(chuàng)建 SQL 身份作為主鍵?)
本文介紹了創(chuàng)建 SQL 身份作為主鍵?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

create table ImagenesUsuario
{
    idImagen int primary key not null IDENTITY
}

這不起作用.我該怎么做?

This doesn't work. How can I do this?

推薦答案

只需對語法進(jìn)行簡單的更改即可:

Simple change to syntax is all that is needed:

 create table ImagenesUsuario (
   idImagen int not null identity(1,1) primary key
 )

通過顯式使用constraint"關(guān)鍵字,您可以為主鍵約束指定一個特定名稱,而不是依賴 SQL Server 自動分配名稱:

By explicitly using the "constraint" keyword, you can give the primary key constraint a particular name rather than depending on SQL Server to auto-assign a name:

 create table ImagenesUsuario (
   idImagen int not null identity(1,1) constraint pk_ImagenesUsario primary key
 )

如果根據(jù)您對表的使用情況最有意義,請?zhí)砑覥LUSTERED"關(guān)鍵字(即,搜索特定 idImagen 和寫入量的平衡超過了通過其他索引對表進(jìn)行聚類的好處).

Add the "CLUSTERED" keyword if that makes the most sense based on your use of the table (i.e., the balance of searches for a particular idImagen and amount of writing outweighs the benefits of clustering the table by some other index).

這篇關(guān)于創(chuàng)建 SQL 身份作為主鍵?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

SQL trigger on Truncate(截斷時的 SQL 觸發(fā)器)
sql search query with multiple optional search parameters(具有多個可選搜索參數(shù)的 sql 搜索查詢)
SQL Efficiency: WHERE IN Subquery vs. JOIN then GROUP(SQL 效率:WHERE IN 子查詢 vs. JOIN 然后 GROUP)
Retrieving XML element name using t-SQL(使用 t-SQL 檢索 XML 元素名稱)
Insert double quotes into SQL output(在 SQL 輸出中插入雙引號)
Delete rows from CTE in SQL SERVER(從 SQL SERVER 中的 CTE 中刪除行)
主站蜘蛛池模板: 99精品欧美一区二区蜜桃免费 | 精品久久久久久久久久久久久 | 国产一级片免费 | 欧美老少妇 | 一区二区三区四区在线视频 | 国产区视频在线 | 日韩精品一区在线观看 | 久久一级片 | 91精品国产乱码久久久 | 国产精品二区一区二区aⅴ污介绍 | 日韩欧美亚洲国产 | 香蕉在线观看 | 亚洲黄色精品 | 在线视频日韩 | 天天操免费视频 | 久久久亚洲天堂 | 在线免费观看黄色片 | 亚洲精品自拍视频 | 欧美天天 | 久久久久久久97 | 成人国产精品一区二区 | 欧美成人精品激情在线观看 | 黄色片在线 | 黄色精品视频 | 国产综合在线视频 | 天天射天天操天天干 | 久久一区 | 91网站免费看 | 91在线看片| 亚洲黄色大片 | 伊人国产在线 | 欧美日韩少妇 | 黄色片一区二区 | 国产天堂在线观看 | 亚洲一区二区三区在线视频 | 亚洲一区久久 | 亚洲欧美一区二区三区在线 | 欧美激情免费 | 成人一级毛片 | 国产视频一区二区在线观看 | 人人爽av |