Thats great Kiran...
For interest I have modified this to just show Unique cols plus PK for the param table:
create PROCEDURE [dbo].[GetUniqueCols]
c.name as [Column_Name],
kc.name as [Constraint_Name],
object_name(c.object_id) as [Table_Name]
from sys.columns c
join sys.key_constraints kc
on (c.column_id = kc.unique_index_id and c.object_id = kc.parent_object_id)
where kc.type='UQ' or kc.type = 'PK'
and c.object_id = object_id(@table_name)
GROUP BY c.name,kc.NAME, object_name(c.object_id)