I like to get the stucture from a SQL Server 2008 table, here's my idea about:
SELECT C.COLUMN_NAME AS [Column]
FROM INFORMATION_SCHEMA.Tables T JOIN INFORMATION_SCHEMA.Columns C
ON T.TABLE_NAME = C.TABLE_NAME
WHERE T.TABLE_NAME ='person'
Now I like to get all data from the table:
SELECT * FROM 'person'
John | Doe
Fred | Smith
My output should looks like:
The only idea I would have to make some C# code with many loops:
foreach() // all rows
// write start element
foreach() // all columns
// write element
For sure I think this will work but do you've any better solution for because I think with big tables it'll need a lot of time for ...