-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
105 additions
and
1 deletion.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
...soft SQL Server Management Studio/Code Snippets/SQL/My Code Snippets/renamecolumn.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | ||
<_locDefinition xmlns="urn:locstudio"> | ||
<_locDefault _loc="locNone" /> | ||
<_locTag _loc="locData">Title</_locTag> | ||
<_locTag _loc="locData">Description</_locTag> | ||
<_locTag _loc="locData">Author</_locTag> | ||
<_locTag _loc="locData">ToolTip</_locTag> | ||
</_locDefinition> | ||
<CodeSnippet Format="1.0.0"> | ||
<Header> | ||
<Title>My Rename Column</Title> | ||
<Shortcut>myrenamecolumn</Shortcut> | ||
<Description>Renames a column.</Description> | ||
<Author>Rudi Breedenraedt</Author> | ||
<SnippetTypes> | ||
<SnippetType>Expansion</SnippetType> | ||
</SnippetTypes> | ||
</Header> | ||
<Snippet> | ||
<Declarations> | ||
<Literal> | ||
<ID>SchemaName</ID> | ||
<ToolTip>Name of the schema</ToolTip> | ||
<Default>dbo</Default> | ||
</Literal> | ||
<Literal> | ||
<ID>TableName</ID> | ||
<ToolTip>Name of the table</ToolTip> | ||
<Default>Sample_Table</Default> | ||
</Literal> | ||
<Literal> | ||
<ID>OldColumnName</ID> | ||
<ToolTip>Original name of the column</ToolTip> | ||
<Default>Old_Column</Default> | ||
</Literal> | ||
<Literal> | ||
<ID>NewColumnName</ID> | ||
<ToolTip>New name of the column</ToolTip> | ||
<Default>New_Column</Default> | ||
</Literal> | ||
</Declarations> | ||
<Code Language="SQL"> | ||
<![CDATA[EXEC sp_rename '[$SchemaName$].[$TableName$].[$OldColumnName$]', '$NewColumnName$', 'COLUMN' | ||
GO | ||
|
||
$end$]]> | ||
</Code> | ||
</Snippet> | ||
</CodeSnippet> | ||
</CodeSnippets> | ||
|
2 changes: 1 addition & 1 deletion
2
Microsoft SQL Server Management Studio/Install on ManagementStudio.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
@ECHO OFF | ||
XCOPY "%~dp0Code Snippets" "%USERPROFILE%\Documents\Visual Studio 2015\Code Snippets" /s /e | ||
XCOPY "%~dp0Code Snippets" "%USERPROFILE%\Documents\SQL Server Management Studio\Code Snippets" /s /e |
52 changes: 52 additions & 0 deletions
52
Microsoft Visual Studio/Code Snippets/SQL_SSDT/My Code Snippets/renamecolumn.snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | ||
<_locDefinition xmlns="urn:locstudio"> | ||
<_locDefault _loc="locNone" /> | ||
<_locTag _loc="locData">Title</_locTag> | ||
<_locTag _loc="locData">Description</_locTag> | ||
<_locTag _loc="locData">Author</_locTag> | ||
<_locTag _loc="locData">ToolTip</_locTag> | ||
</_locDefinition> | ||
<CodeSnippet Format="1.0.0"> | ||
<Header> | ||
<Title>My Rename Column</Title> | ||
<Shortcut>myrenamecolumn</Shortcut> | ||
<Description>Renames a column.</Description> | ||
<Author>Rudi Breedenraedt</Author> | ||
<SnippetTypes> | ||
<SnippetType>Expansion</SnippetType> | ||
</SnippetTypes> | ||
</Header> | ||
<Snippet> | ||
<Declarations> | ||
<Literal> | ||
<ID>SchemaName</ID> | ||
<ToolTip>Name of the schema</ToolTip> | ||
<Default>dbo</Default> | ||
</Literal> | ||
<Literal> | ||
<ID>TableName</ID> | ||
<ToolTip>Name of the table</ToolTip> | ||
<Default>Sample_Table</Default> | ||
</Literal> | ||
<Literal> | ||
<ID>OldColumnName</ID> | ||
<ToolTip>Original name of the column</ToolTip> | ||
<Default>Old_Column</Default> | ||
</Literal> | ||
<Literal> | ||
<ID>NewColumnName</ID> | ||
<ToolTip>New name of the column</ToolTip> | ||
<Default>New_Column</Default> | ||
</Literal> | ||
</Declarations> | ||
<Code Language="SQL_SSDT"> | ||
<![CDATA[EXEC sp_rename '[$SchemaName$].[$TableName$].[$OldColumnName$]', '$NewColumnName$', 'COLUMN' | ||
GO | ||
|
||
$end$]]> | ||
</Code> | ||
</Snippet> | ||
</CodeSnippet> | ||
</CodeSnippets> | ||
|