Showing posts with label result set Meta Data. Show all posts
Showing posts with label result set Meta Data. Show all posts

Saturday, 11 April 2015

SP_DESCRIBE_FIRST_RESULT_SET to view result set metadata

      When I was looking for what’s new in the SQL server 2012, one small and interesting item I found that SET FMTONLY and sp_describe_first_result_set, let’s have a look:

SET FMTONLY: This setting has two values ON and OFF, when it is ON client only can see the format of the result set, not data. This is for run time setting, not compile time. Below is the example: 

SET FMTONLY OFF
GO 
SELECT * 
  FROM [AdventureWorks2008R2].[HumanResources].[Employee]