This article is a mirror article of machine translation, please click here to jump to the original article.

View: 15179|Reply: 0

[Communication] sql primary key number int type auto-grows, what if it exceeds the maximum?

[Copy link]
Posted on 10/15/2014 4:25:53 PM | | |
Questions about table primary keys: Design a table primary key is int type, automatically increased to 1, then the maximum value of int type is "2147483647" When the number of data items is greater than this number, can data still be added to the table? Will it be an error?   

Answer:
If you can't add it, SQL Server will report an error. 值 Data types are out of range.

For primary keys, you can use the uniqueidentifier data type to avoid the problem of over-bounding. uniqueidentifier is a GUID that is unique and efficient.





Previous:The magician under the moonlight came to see him.
Next:[Front-end testing] web compatibility test method
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com