Getting table schema from a query

前端 未结 5 501

As per MSDN, SqlDataReader.GetSchemaTable returns column metadata for the query executed. I am wondering is there a similar method that will give table metadata

5条回答
  •  半阙折子戏
    2021-01-12 12:55

    You could get the execution plan for the query, and then analyse the XML that's returned. This is like using the "Show Estimated Plan" option in Management Studio.

提交回复
热议问题