What is Primary Key?




Answers were Sorted based on User's Feedback



What is Primary Key?..

Answer / ashis kumar jena

A primary key is one which uniquely identifies a row
of a table.
This key does not allow null values and also
does not allow duplicate values.
Each table should have a primary key, and each table can
have only one primary key.

Is This Answer Correct ?    16 Yes 2 No

What is Primary Key?..

Answer / perumal

1. Primary Key Doesn't allow the NULL values and also
does not allow duplicate values.

2. Primary Key has the Unique Columns.

3. Primary Key Uniquely Identify the each row of the tables.

Is This Answer Correct ?    14 Yes 3 No

What is Primary Key?..

Answer / hannan oca

primary key =notnull+unique value in column

a table consist of only one primary key.

Example

a primary key is like a father in house, like only one but
there may be a lot of childs just like columns.

Is This Answer Correct ?    3 Yes 1 No




What is Primary Key?..

Answer / satheeh

Primary key is nothing but restriction or condition or constraint given to a specific column to avoid the null and duplicate values.
primary key=not null+unique
that means primary key performs both operations at a time.
primary key plays vital role when relationship between two or more tables

Is This Answer Correct ?    2 Yes 1 No

Post New Answer



More SQL PLSQL Interview Questions

From an Employee table, how will you display the record which has a maximum salary?

29 Answers   Synechron, Exilant, Cap Gemini,


declare lowerl number:= 1; upperl number:= 3; num varchar2(10); begin for i into lowerl..upperl loop num:=num||to_char(lowerl); if i=3 then upperl:=5; end loop; message(num); What will be the output ?

3 Answers   Oracle,


What are the blocks in stored procedure?

6 Answers   Microsoft,


What is magic table?

6 Answers  


what is Complex index. how to create it?

2 Answers  






What is Highwatermark?

3 Answers   Thermotech,


what is the purpose of update command in oracle?

7 Answers   MBT,


Differentiate between syntax and runtime errors.

0 Answers  


how to check the 3rd max salary from an employee table? One of the queries used is as follows: select sal from emp a where 3=(select count(distinct(sal)) from emp b where a.sal<=b.sal). Here in the sub query "select count(distinct(sal)) from emp b where a.sal<=b.sal" or "select count(distinct(sal)) from emp b where a.sal=b.sal" should reveal the same number of rows is in't it? Can any one here please explain me how is this query working perfectly. However, there is another query to get the 3rd highest of salaries of employees that logic I can understand. Pls find the query below. "select min(salary) from emp where salary in(select distinct top 3 salary from emp order by salary desc)" Please explain me how "select sal from emp a where 3=(select count(distinct(sal)) from emp b where a.sal<=b.sal)" works source:http://www.allinterview.com/showanswers/33264.html. Thanks in advance Regards, Karthik.

4 Answers  


What is the criteria while applying index to any column on any table.

1 Answers   Infogain,


What are the difference between Functions/Stored Procs and Triggers and where are they used.

1 Answers   TCS, CGI,


In a package if we have 10 procedures or functions,How to know which will execute first?

1 Answers   Sollet Soft,






Categories