Get a Primary Key Column Name in Entire Database

Hi Everybody, Everyone knows Primary key main concept in our SQL Database. If we have no primary Key concept painful task to Handle Database.

In this query return of Current database name, Primary Column Name and last is Table Name.
  1. Select constraint_catalog [Database Name],  column_name [Primary column],TABLE_NAME [Table NameFROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE    
  2. WHERE OBJECTPROPERTY(OBJECT_ID(constraint_name), 'IsPrimaryKey') = 1 AND  table_name inselect name from sys.tables)     
In the last month asked this type of question in Interview. How to Get all Primary key column Name in single Database. So i share this question with Respective C-sharpcorner.com Readers.