SyntaxFix
Write A Post
Hire A Developer
Questions
select * FROM doc_tab PIVOT ( Min(document_id) FOR document_type IN ('Voters ID','Pan card','Drivers licence') )
outputs as this
sql fiddle demo here