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 |
Can a table contain multiple foreign key’s?
What is acid property in a database?
How many types of index are there?
one of the column in my table contains the data like SAL ---- 1000 1000 2000 3000 3000 So my requirement is i want output like SAL --- 1000 2000 3000 it mean i want to delete duplicate rows in the table permanently and i want output in the above formatow should u write query?
What is left join example?
Can there be 2 primary keys in a table?
How to perform a loop through all tables in pl/sql?
I want to create synonym for table emp but in my pc it is giving insufficient previliges.I am using user scott.Please suggest me.
what is rdbms? : Sql dba
what are the t string functions available in tsql? : Transact sql
IF EMP HAS 2 ROWS,DEPT HAS 4 ROWS.WHATS THE RESULT OF SELECT * FROM EMP,DEPT;
what is the difference between myisam static and myisam dynamic? : Sql dba