MSSQL 4 results

Microsoft SQL Server Snippets

Snippets are available with TeamSQL Pro Plan. First item is the label of snippet so you can start writing one of the labels in TeamSQL Query Editor and use them.     SELECT * FROM... Simple SELECT command SELECT * FROM with WHERE clause... Simple SELECT command with WHERE clause SELECT with INNER JOIN... SELECT Command with INNER JOIN INSERT INTO... Insert into a table on "dbo" INSERT INTO with SELECT... Insert into a table on "dbo" using SELECT DELETE ...

Connection Microsoft SQL Server over TCP/IP

You must enable TCP/IP connection of Microsoft SQL Server, so you can connect it to from TeamSQL. It's required. Please check this out to enable TCP/IP Connection of Microsoft SQL Server : https://technet.microsoft.com/en-us/library/hh231672(v=sql.110).aspx Checks these first: Start the "SQL SERVER BROWSER" Service in Windows services if it's not already started. See: https://technet.microsoft.com/en-us/library/ms165734(v=sql.90).aspx Host name cannot be "." (dot) SQL Server ...

SQL COALESCE Function

The first time I saw the term COALESCE in a SQL manual, I thought it was a scientific function for some complex calculation. However, later I found that it is a straightforward and handy function. In this article, I will show several examples to explain how to use the COALESCE function.   THE REASON BEHIND COALESCE: THE NULL VALUE Before go deep with COALESCE function, the reader needs to understand how the NULL value works in some expressions. A NULL value in a table column means ...

Cast vs. Convert

When working with Microsoft’s SQL Server (and by extension, T-SQL), you have two options when making explicit conversions: CAST and CONVERT. Many people use them frequently, and quite often interchangeably, but there are some cases when one is a better choice than the other. This post covers the similarities and the differences between the two, as well as when you’re better off using one over the other. Similarities When doing explicit data conversions, CAST and CONVERT are available ...