I want to know difference between these two key.
When the Unique key with not null
constrain in terms of how they are stored in database
and wh
To answer you comment, Yes! In general there is one huge difference in how unique keys and primary keys are stored in SQL Server 2008.
A unique key by default (you can change that) will be created as a non-clustered index and a PK will be created as a clustered index by default (you can change that also).
Non-clustered means it will be stored in a structure "attached" to the table and will consume disk space.
Clustered means the records will be actually stored in that physical order, no consuming disk space, and that's why your table can own just one clustered index. (Just if you are wondering... no, you cannot get 2 non-clustered PK in a table, PK are unique even if they are non-clustered.)