If we declare constraints Unique and Not null on a single
column then it will act as a Primary key, so what is the use
of primary key??
Answers were Sorted based on User's Feedback
Answer / neha sinha
1) Primary key creates clustered index and unique key
creates non-clustered index. Performance wise clustered
index is fast so we need Primary key.
2)if we need more then one primary key in table than we can
use unique key+NOT NULL becous it behave as Primary key but
we cant define more than one column as primary key. :)
Is This Answer Correct ? | 23 Yes | 1 No |
Answer / neha sinha
1) Primary key creates clustered index and unique key
creates non-clustered index. Performance wise clustered
index is fast so we need Primary key.
2)if we need more then one primary key in table than we can
use unique key+NOT NULL becous it behave as Primary key but
we cant define more than one column as primary key. :)
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / ashok
Internally , There is same as primary key and unique not null.
You can say unique + not null is higher step of primary key .
So there is no basic difference between this two.
Is This Answer Correct ? | 7 Yes | 11 No |
What is Primary Key?
What are schema-level triggers?
Is it possible for a table to have more than one foreign key?
What is java sql driver?
How will we see framework of a table?
What cursor type do you use to retrieve multiple recordsets?
17 Answers Apollo, CTS, IonIdea, Microsoft, Oracle, TCS, Vmoksha, Wipro,
Does it possible to pass object (or) table as an argument to a remote procedure?
Types of joins?
Do stored procedures prevent sql injection?
need to split a string into seperate values. eg. col1 col2 ---------- 100 - 'a,b,c' 200 - 'a,x,b,d,e' 300 - 'c' result: value count ------------- a - 2 b - 1 c - 2 etc.
how can we submit a form without a submit button? : Sql dba
What is a call statement? Explain with an example.