Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to get a result as a column?

The SELECT query will only need to return one record, however, at the time of querying the database it will not know what attributes are in the table, and could get a different number of attributes back: between 6-10.

share|improve this question
Sounds like you need to look at pivot -… But I'm guessing since you didn't provide a lot of details. – bluefeet May 6 '14 at 19:08
Not sure if I understand you question. Can you give sample data and/or expected results? – IsmailS May 9 '14 at 14:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.