Primary key
|
Unique Key
|
1- Primary
key doesn’t have a null value.
2- A table can have only one primary key.
3- By
default primary key has a clustered index.
|
The unique key can hold null value but only once.
A table can have more than one unique key. By default, the Unique key has a non- clustered index. |
Difference between Primary key and Unique Key
Subscribe to:
Post Comments (Atom)
Related Posts
What is the Use of isNaN Function in JavaScript? A Comprehensive Explanation for Effective Input Validation
In the world of JavaScript, input validation is a critical aspect of ensuring that user-provided data is processed correctly. One indispensa...
-
Sometimes we need to remove special characters from string or columns value. Suppose, we developed an ETL tool that inserting records on ...
-
This issue comes much time when we are using PostgreSQL with Node.js, Error: Cannot find module 'bcrypt' in nodejs application, and...
-
In the world of JavaScript, input validation is a critical aspect of ensuring that user-provided data is processed correctly. One indispensa...
-
Many times we come across the scenario where we need to some code based on whether an index exists or not. The following query may he...
-
If you are a DBA and you are working on a data-dictionary for a project so that you can keep track of schema changes and so on, then this ...
-
Problem: I need to clone production database to the testing purpose, mean I want to create the copy of the production database, so what ...
-
CREATE DATABASE permission denied in database 'master' Sometimes we find errors like bellow when creating a database in Mi...
-
Many scenarios come in query writing, we have to check particular VIEW exists in the database or not. There are many approaches to che...
-
In this article, we will learn how to create an AppSync API with the Lambda function. I will show you how a lambda function is written usi...
-
There are many scenarios where we need to get the first and last day of the previous month. Suppose we want to see the order summary of t...
No comments:
Post a Comment
Please do not enter any spam link in the comment box.