Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 651

How to add table column headings to sql select statement

$
0
0

I have a SQL select statement like this:

select FirstName, LastName, Age from People

This will return me something like a table:

Peter  Smith    34John   Walker   46Pat    Benetar  57

What I want is to insert the column headings into the first row like:

First Name  Last Name  Age=========== ========== ====Peter       Smith      34John        Walker     46Pat         Benetar    57

Can someone suggest how this could be achieved?

Could you maybe create a temporary table with the headings and append the data one to this?


Viewing all articles
Browse latest Browse all 651

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>