PRIMARY KEY | UNIQUE KEY |
NULL value is not allowed | NULL is allowed, subject to the condition that only a single NULL is allowed. Inserting more null throws “Cannot insert duplicate key” error. |
Table can have only one PRIMARY KEY constraint defined | Table can have multiple UNIQUE KEY constraints Defined |
By default, if a clustered index is not defined already on the table, defining a PRIMARY KEY constraint results in a clustered index with same name as PRIMARY KEY | By default non-clustered index is create when a UNIQUE KEY constraint is added. |
Purpose is to provide a unique identity to each row | Purpose is to avoid duplication |
Tuesday, June 28, 2011
Difference between PRIMARY KEY and UNIQUE KEY
Subscribe to:
Post Comments (Atom)
Comparing features of LangGraph vs CrewAI
LangGraph Orchestration vs CrewAI Orchestration The following table compares LangGraph and CrewAI orchestration across their menta...
-
http://www.sommarskog.se/share_data.html How to Share Data Between Stored Procedures An SQL text by Erland Sommarskog, SQL Server MVP. M...
-
CONCLUSION : 1. Normally, use following two when you do not want query compilation also to come into picture. CHECKPOINT DBCC DROPCLEA...
-
The evolution of LangChain has led to significant shifts in how agents are constructed, moving from the legacy AgentExecutor to the graph-b...
No comments:
Post a Comment