SQL Server series: Microsoft SQL Server Management Studio Template Explorer

Source: Internet
Author: User
Tags management studio microsoft sql server management studio sql server management sql server management studio



Template Explorer is a component of Microsoft SQL Server Management Studio that can be used with SQL code templates, using the code provided by templates, and eliminating the need to enter basic code every time.



To use Template Explorer:



1>. After you open the Microsoft SQL Server Management Studio main interface, choose View, Template Explorer, to open the Template browser window.






2>. The template Explorer is grouped by code type, and you can double-click the Create Database template under Open database to view the following:






3>. Position the cursor to the left window, where a query menu appears in the menu in Microsoft SQL Server Management Studio, and select query, specify values for template parameters.






4>. Open the Specify Values for template Parameters dialog box and enter the value test in the Value text box.






5>. After the input is complete, click OK to return to the query editing window for the code template, where the database_name value in the code in the template is replaced by the test value.


 
 
-- =============================================
-- Create database template
-- =============================================
USE master
GO

-- Drop the database if it already exists
IF  EXISTS (
    SELECT name 
        FROM sys.databases 
        WHERE name = N‘Test‘
)
DROP DATABASE Test
GO

CREATE DATABASE Test
GO


SQL Server series: Microsoft SQL Server Management Studio Template Explorer


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.