t-sql Archives - {coding}Sight https://codingsight.com/tag/t-sql/ Blog for SQL Server DBAs and Developers Tue, 27 Jun 2023 04:31:01 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.2 https://codingsight.com/wp-content/uploads/2021/10/cropped-Soсial_-Fb_180х180-1-32x32.png t-sql Archives - {coding}Sight https://codingsight.com/tag/t-sql/ 32 32 Getting Started with the SQL Server T-SQL CASE Expression Statement https://codingsight.com/getting-started-with-the-sql-server-t-sql-case-expression-statement/ Tue, 15 Mar 2022 15:44:46 +0000 http://codingsight.com/?p=19931 SQL Server CASE expression is very useful in returning an output based on some conditional matching criteria. We can state multiple conditions in the CASE..WHEN expression and get the associated output defined in the THEN or ELSE statement. CASE expression offers two approaches to compare and return a condition-based result. As per MSDN, the Simple …

The post Getting Started with the SQL Server T-SQL CASE Expression Statement appeared first on {coding}Sight.

]]>
SQL Server Primary Key https://codingsight.com/primary-keys-in-sql-server/ Tue, 22 Feb 2022 14:20:47 +0000 http://codingsight.com/?p=18566 Across all major RDBMS products, Primary Key in SQL constraints has a vital role. They identify the records present in a table uniquely. Hence, we should choose Primary Keys server carefully during the table design to improve the performance. In this article, we’ll learn what a Primary Key constraint is. Also, we’ll see how to …

The post SQL Server Primary Key appeared first on {coding}Sight.

]]>
Overview of T-SQL PRINT Statement https://codingsight.com/t-sql-print-statement/ Thu, 12 Aug 2021 07:57:25 +0000 http://codingsight.com/?p=16076 PRINT statements are crucial in any programming language. They will allow the routine or program that you are running to dump some type of log or information into a console to be viewed and analyzed. PRINTs are valuable to debugging problems within an application code. In this article, we will explore how to effectively use …

The post Overview of T-SQL PRINT Statement appeared first on {coding}Sight.

]]>
SQL Stuff Function https://codingsight.com/t-sql-stuff-command/ Wed, 16 Jun 2021 06:45:57 +0000 http://codingsight.com/?p=14559 The main idea around the SQL Server function called STUFF is concatenating multiple columns into a single column with more flexibility than the CONCAT function would provide. Besides, STUFF can be combined with other techniques for some interesting effects. In this article, we’ll explore the possibilities that the STUFF command provides for SQL Database specialists. …

The post SQL Stuff Function appeared first on {coding}Sight.

]]>
SQL Server Replication Monitor: Scripts for Checking Replication Status https://codingsight.com/managing-your-ms-sql-replication/ Mon, 24 May 2021 08:54:40 +0000 http://codingsight.com/?p=14035 Replication is one of the oldest technologies on MS SQL Server, loved by every database administrator. It is a great and reliable technology for bringing data closer to users, especially for distributed reporting. Thanks to it, the database availability increases across multiple SQL Servers and regions. Replication was introduced in SQL 2005. Can you believe …

The post SQL Server Replication Monitor: Scripts for Checking Replication Status appeared first on {coding}Sight.

]]>
Clustered and Non Clustered Index: 7 Top Points Explained https://codingsight.com/clustered-and-non-clustered-index-7-top-points-explained/ https://codingsight.com/clustered-and-non-clustered-index-7-top-points-explained/#comments Tue, 18 May 2021 10:46:14 +0000 http://codingsight.com/?p=13911 Indexes are speed-boosters in SQL databases. They can be clustered or non-clustered. But what does it mean and where should you apply each? I know this feeling. I’ve been there. First-timers are often confused about which index to use on which columns. However, even experts need to think this issue through before making a decision, and …

The post Clustered and Non Clustered Index: 7 Top Points Explained appeared first on {coding}Sight.

]]>
https://codingsight.com/clustered-and-non-clustered-index-7-top-points-explained/feed/ 1
MySQL UPDATE: Top 5 Tips for T-SQL Developers https://codingsight.com/mysql-update-top-5-tips-for-t-sql-developers/ Fri, 07 May 2021 08:48:57 +0000 http://codingsight.com/?p=13568 Are you adding MySQL to your list of database skillsets? Then MySQL UPDATE statement is one of the commands you need to learn. We are continuing our journey to MySQL from the SQL Server point of view. It started with CREATE TABLE, followed by INSERT, and the most recent piece was about DELETE. Today, UPDATE is our focal …

The post MySQL UPDATE: Top 5 Tips for T-SQL Developers appeared first on {coding}Sight.

]]>
In memory Tables (OLTP) in Microsoft SQL Server Databases with Examples https://codingsight.com/in-memory-oltp-top-10-points-for-beginners/ https://codingsight.com/in-memory-oltp-top-10-points-for-beginners/#comments Thu, 29 Apr 2021 12:44:51 +0000 http://codingsight.com/?p=13004 What if 1 second of a transaction process is too long? You can tune your queries. But what if it’s not enough, can you still step up your game? In-memory OLTP may be the answer. The current article will focus on this SQL Server’s technology for optimizing transaction processing. In particular, we’ll examine the following points: Fasten the …

The post In memory Tables (OLTP) in Microsoft SQL Server Databases with Examples appeared first on {coding}Sight.

]]>
https://codingsight.com/in-memory-oltp-top-10-points-for-beginners/feed/ 2
Understanding DROP TABLE IF EXISTS SQL Statement https://codingsight.com/understanding-drop-table-if-exists-sql-statement/ Mon, 26 Apr 2021 13:08:28 +0000 http://codingsight.com/?p=13128 The T SQL DROP TABLE IF EXISTS statement is used to drop existing database objects. In this article, we are going to study the various use cases for this command and illustrate them with practical examples. When we create a complex stored procedure, we might also make several intermediate tables (physical tables or temp tables) …

The post Understanding DROP TABLE IF EXISTS SQL Statement appeared first on {coding}Sight.

]]>
TOP 5 MySQL Delete Syntax with Tips for T-SQL Developers https://codingsight.com/top-5-mysql-delete-syntax-for-t-sql-developers/ Tue, 23 Mar 2021 10:12:32 +0000 http://codingsight.com/?p=12492 Our journey to MySQL started with CREATE TABLE followed by INSERT. Today, we are proceeding to the MySQL DELETE statement. It is almost as common as the MySQL UPDATE statement. Since you are familiar with T-SQL DELETE, the goal is to make you more productive using the MySQL syntax. There are minor differences in these DELETE statements, but …

The post TOP 5 MySQL Delete Syntax with Tips for T-SQL Developers appeared first on {coding}Sight.

]]>