Home » SQL & PL/SQL » SQL & PL/SQL » Unique Key when Not null behaves same as Priamary Key....Then what is difference.
icon12.gif  Unique Key when Not null behaves same as Priamary Key....Then what is difference. [message #270002] Tue, 25 September 2007 06:38 Go to next message
rajatchhabra
Messages: 7
Registered: September 2007
Location: India
Junior Member

Why do we need primary key in a table if same requirement can be achieved by Unique key with Not null ??

Please reply
Re: Unique Key when Not null behaves same as Priamary Key....Then what is difference. [message #270006 is a reply to message #270002] Tue, 25 September 2007 07:10 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
Why PK ... why not unique index + not null

MHE
Re: Unique Key when Not null behaves same as Priamary Key....Then what is difference. [message #270017 is a reply to message #270006] Tue, 25 September 2007 07:41 Go to previous messageGo to next message
rajatchhabra
Messages: 7
Registered: September 2007
Location: India
Junior Member

That is my question...We can achieve same requirement by UK + Not null and as you added Index also....then what is need for PK...??
Re: Unique Key when Not null behaves same as Priamary Key....Then what is difference. [message #270020 is a reply to message #270017] Tue, 25 September 2007 07:50 Go to previous messageGo to next message
joy_division
Messages: 4642
Registered: February 2005
Location: East Coast USA
Senior Member
Raja:

I am not sure you realized that Maaher posted a link.
Re: Unique Key when Not null behaves same as Priamary Key....Then what is difference. [message #270159 is a reply to message #270020] Wed, 26 September 2007 00:11 Go to previous message
rajatchhabra
Messages: 7
Registered: September 2007
Location: India
Junior Member

Thanks Maher....for providing the link.....i got my solution there.
Previous Topic: Date Comparison using to_date
Next Topic: cursor parameters
Goto Forum:
  


Current Time: Wed Dec 07 18:17:34 CST 2016

Total time taken to generate the page: 0.18920 seconds