
SELECT multiple rows back as one row with many columns
I'm querying a Key/Value table (Product_Id INT, Key VARCHAR(255), Value VARCHAR(255) NULL) and I want to return the Key/Value pairs in a single row for the specified Product_Id. What's the fastest way to do this?
Currently to get a key, I do something like:
What I want to see a row like:
Product_Id, Key [aliased to the Key and containing the value], [More Keys here]...
Is this even possible?