Is there any option like get the table format or result-set format of underline query without truly executing the query in SQL Server? The answer is Yes. You can write T-SQL query and see the result format without return the data.
How To ?
SET FMTONLY ON option allows us to get the format of the table or result set without actually running the query. Its return metadata only to the client. Therefor if you include actual execution plan to the query it won't fire. below is the code.
USE [AdventureWorksDW2014] GO SET FMTONLY ON; SELECT * FROM dbo.DimCustomer SET FMTONLY OFF;
Comments
Post a Comment