I have a query like this
@"SELECT
TABLE_NAME
AS
TABLES
FROM
INFORMATION_SCHEMA.TABLE_CONSTRAINTS
WHERE
CONSTRAINT_TYPE = 'PRIMARY KEY'
AND
TABLE_NAME <> 'dtProperties'
ORDER BY
TABLE_NAME";
Is there any way to convert the tabular form to string formatted form when retrieving list of tables from this query.
Via .NET it is neither – that is just the SSMS display. Based on the previous questions, it sounds like you are just having difficulties reading this column into strings;
Perhaps just something like:
(tested locally; works fine)
If you want something delimited, then perhaps:
Or something involving a
StringBuilder(newlines in this example):