⌘BABAKOV.NET Let's code!
100% [dark] [ru]
~/tags/mssql $

#MSSQL

38 posts

38 total · page 2 / 4

MERGE Example in MSSQL T-SQL

Simple MERGE example for TSQL. The example assumes that we are working with two tables of the same structure (in real life, this condition is not necessary). The TargetTable and SourceTable tables consist of only two fields: Id - some identifier. Name - object name.

38 views 0 comments 0 likes ./Read →

Selecting Long Strings in MSSQL Manager

By default, the length of a string in MSSQL Manager queries is limited, and when the string size is large enough, only its part will be retrieved in the query, but there is a way to bypass this issue. To select a long string, it is enough to simply assign the name to the field with the name [XML_F52E2B61-18A1-11d1-B105-00805F49916B].

24 views 0 comments 0 likes ./Read →

Deleting Temporary Tables in MSSQL

Sometimes there is a need to delete a temporarily created table during a procedure, which may or may not exist. Simply writing, for example, drop table #myTempTable is not enough, because if the table does not exist, the query will not execute and will return an error. The example below shows how to correctly delete temporary tables in such cases:

37 views 0 comments 0 likes ./Read →