How do I return the SQL data types from my query?

前端 未结 13 1489
耶瑟儿~
耶瑟儿~ 2021-01-29 23:58

I\'ve a SQL query that queries an enormous (as in, hundreds of views/tables with hard-to-read names like CMM-CPP-FAP-ADD) database that I don\'t need nor want to understand. Th

13条回答
  •  悲&欢浪女
    2021-01-30 00:28

    sp_describe_first_result_set

    will help to identify the datatypes of query by analyzing datatypes of first resultset of query

    https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-describe-first-result-set-transact-sql?view=sql-server-2017

提交回复
热议问题