Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can a table have two primary keys?

Answer Posted / satish reddy

Each table can have only one primary key; however, that key may consist of more than one column.

SQL> create table EMP(EMPNO Number(5),EMPNAME Varchar2(10),ADDRESS Varchar2(10),Constraint Multi_Constr
aint Primary Key(EMPNO,EMPNAME));

After creating table try to insert null value into EMPNAME Column, it will throw an error "cannot insert NULL into ("SCOTT"."EMP"."EMPNAME")"

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can triggers be used for the table auditing?

1069


What are the types of variables use in pl sql?

1043


what is the difference between myisam static and myisam dynamic? : Sql dba

1063


Which are the different types of indexes in sql?

1058


What is full form of rtm?

1007


What is rtm stands for?

1096


Is it important to partition hard disk?

1024


Could you please provide oca (oracle 10g) dumps for my certification ?

5166


Is merge a dml statement?

978


What is a schema? How is it useful in sql servers?

1119


explain what is mysql? : Sql dba

1080


List different type of expressions with the example.

935


What are different types of functions in sql?

1004


What does rownum mean in sql?

1023


What is a sql schema used for?

1100