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



If we declare constraints Unique and Not null on a single column then it will act as a Primary key..

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

If we declare constraints Unique and Not null on a single column then it will act as a Primary key..

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

If we declare constraints Unique and Not null on a single column then it will act as a Primary key..

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

Post New Answer

More SQL PLSQL Interview Questions

How can you select unique records from a table?

0 Answers  


How many scalar data types are supported in pl/sql?

0 Answers  


What is Overloading of procedures ?

4 Answers   Amdocs,


what does it mean to have quoted_identifier on? : Sql dba

0 Answers  


Can there be more than one function with a similar name in a pl/sql block?

0 Answers  






How many tables can a sql database have?

0 Answers  


how to get a list of columns in an existing table? : Sql dba

0 Answers  


in oracle 10g sw after compiling procedure how to pass parameter values ,if we (v_empid out number)how to give empid after successful compilation program.This site exact suitable for 10g with respect to question & answer same format , im trying sql browser & sql command prompt using exec procedure name & respective parameters.

0 Answers  


What is faster join or subquery?

0 Answers  


What is the difference between execution of triggers and stored procedures?

0 Answers  


pl/sql testing means what ...... explain process how to find pl/sql bugs

1 Answers   Zensar,


in sql table follw columns r their vehicle_no|servicetype|date|location| 1234 |1FS |1-JAN|PUNE| 4561 |2FS |5-JAN|PUNE| 1234 |PS |7-JAN|PUNE| 1234 |PS |15-JAN|MUMB| i want o/p below vehicleno|1fs|1fsdate|1fslocation|1ps|1PSDATE|1PSLOC|2PS|2PS DATE|2PSLOCA e.g 1234|1FS|1JAN|PUNE|1PS|7JAN|PUNE|2PS|15JAN|MUMBAI PLS help me out to execute using sql query

1 Answers  


Categories