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??

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When is the explicit cursor used ?

588


What is clause in sql?

579


What is crud diagram?

509


How show all rows in sql?

608


what is the functionality of the function htmlentities? : Sql dba

519






What is on delete restrict?

534


How to run sql*plus commands in sql developer?

588


Is it possible to update views?

533


State few characteristics of pl/sql?

565


Can we insert data in view?

501


What are the types of optimization?

519


What is the mutating table and constraining table?

556


What is the use of count (*) in sql?

542


Write the order of precedence for validation of a column in a table? I. Done using database triggers. Ii. Done using integarity constraints

640


Write a sql query to find the names of employees that begin with ‘a’?

576