Home > SQL Server > Get the metadata for a query without resultset- SET FMTONLY – SQL Server

Get the metadata for a query without resultset- SET FMTONLY – SQL Server


SET FMTONLY is used to set up the current SQL server session to return only metadata for the SQL query execution without resultset.

This set option is useful when we develop an application interface for the database. It saves a lot of  query execution time with out processing the data in the development phase.

Note: This feature will not be available in future release and there are other functions that are used as an alternative for this.

Usage

SET FMTONLY ON
or
SET FMTONLY OFF

Example

1. Set format only to on.

pic12. Set format only to off.

pic2

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: