Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sql server 2008 codeSnippets or templates advice needed

There are many tools out there some free and some not that offer a codesnippet facility. For some reasons in the company I work for they dont want to install or buy any third party stuff.

I need to work with just sql server 2008. Is there a way to modify the templates so that when you choose create new SP it loads the custom sp. In a nutshell I would like to know either if I can have code snippets in sql server 2008 without using third party tool or how i can modify templates.

Any suggestions?

Thanks a lot

like image 705
user9969 Avatar asked Sep 05 '10 07:09

user9969


People also ask

What is code snippet SQL?

code snippet is a template containing the basic structure of a Transact-SQL statement or block. You can use snippets as a starting point when adding statements in the Database Engine Query Editor. You can insert the pre-defined snippets supplied with SQL Server, or create your own.

What is the best way to share a long SQL code snippet?

One of the simplest methods of sharing snippets within a team is to change the location of Prompt's snippet folder to be a network share (one that, ideally, is regularly backed up).

What are SQL Server templates?

Applies to: SQL Server (all supported versions) Azure SQL Database Azure SQL Managed Instance Azure Synapse Analytics Analytics Platform System (PDW) SQL Server provides a variety of templates. Templates are boilerplate files containing SQL scripts that help you create objects in a database.


1 Answers

SQL Server Mangement Studio has always supported the use of templates that can serve as "snippets" - see the MSDN docs on how to use Templates.

This is built-in, free, no cost, no install - just use it. It's quite useful to create your own set of scripts as custom templates for those that you use frequently.

like image 137
marc_s Avatar answered Sep 24 '22 06:09

marc_s