Sql table content results can we get along with headers?

Asked By 0 points N/A Posted on -
qa-featured

 

Can we get SQL table content results, along with headers?  Say I have a table that has 10 fields of data.

Select * from Patients

I want to copy the content of the results with the headers. Is this possible, I am using SQL 2005?

SHARE
Best Answer by jamesfrance
Best Answer
Best Answer
Answered By 0 points N/A #119470

Sql table content results can we get along with headers?

qa-featured

Hi ElbertJam,

Can we get SQL table content results, along with headers?  Say I have a table that has 10 fields of data.

Select * from Patients

I want to copy the content of the results with the headers. Is this possible, I am using SQL 2005?

As I’ve read your question, definitely yes! You can do that as long as you are doing nothing wrong with your application and files. So I suggest, you try it and I assure you that you can do it, without any hesitation. Also I did some research about your issue and I found out that you can do it. This would help.

Thanks

Answered By 0 points N/A #119471

Sql table content results can we get along with headers?

qa-featured

Hi ElbertJam,

it is quite obvious that you can get data from any of your tables along with their field heads. Just like you demonstrated, your table ‘Patient’. While selecting “*” means, you are going to select all the available fields of the table. When you write this query i.e.

SQL> Select * from PATIENT;

it means it is going to select all the available records, along with their Attributes title and all the data available to that table without any restriction “Where” clause query.

To copy the contents, if you have any spreadsheet installed on your system, then select all available data extracted from this query and then paste it to that spreadsheet like MS EXCEL.

Hope this solution widely answers your question.

Login/Register to Answer

Related Questions