T-SQL Archives - {coding}Sight https://codingsight.com/category/languages-coding/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/category/languages-coding/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.

]]>
T-SQL Scripts to Monitor your Resource Pool Stats https://codingsight.com/monitor-your-resource-pool-stats-with-sql-server-resource-governor/ Fri, 11 Jun 2021 09:06:04 +0000 http://codingsight.com/?p=14649 Imagine you have a business-critical MS SQL Server serving requests for both OLTP and some batch processing tasks, as data gets pulled by another team. That might be reporting services or extracting data to push to another data warehousing environment, or else. Under this scenario, your SQL Server is treating numerous requests from multiple applications. …

The post T-SQL Scripts to Monitor your Resource Pool Stats appeared first on {coding}Sight.

]]>
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.

]]>
3 Methods to Rebuild All Indexes for All Tables with T-SQL in SQL Server Database https://codingsight.com/different-methods-to-rebuild-all-indexes-for-all-tables/ Fri, 26 Mar 2021 10:36:49 +0000 http://codingsight.com/?p=12554 There are several methods of how to rebuild all indexes of all tables in SQL Server, among them: Using SQL Server maintenance plans. Using T-SQL script based on the fragmentation percent. Using ALTER INDEX command. In this article, we’ll explore these methods and illustrate them with practical examples. 1. SQL Server Rebuild Index Maintenance Plan …

The post 3 Methods to Rebuild All Indexes for All Tables with T-SQL in SQL Server Database 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.

]]>
22 Different T-SQL Indexes Examples to Warp Speed Your Queries https://codingsight.com/22-nifty-sql-index-examples-to-warp-speed-your-queries/ Tue, 09 Mar 2021 11:30:31 +0000 http://codingsight.com/?p=12234 Indexing the database tables is one of the ways to up your game in tuning queries. How do you do it? Today’s post will give you 22 SQL index examples of SQL query optimization to run your queries in a flash. You can add an index using CREATE TABLE along a column, or in the …

The post 22 Different T-SQL Indexes Examples to Warp Speed Your Queries appeared first on {coding}Sight.

]]>
MySQL Insert Command vs T-SQL Query Syntax with Examples https://codingsight.com/top-5-facts-about-mysql-insert-for-t-sql-developers/ Tue, 16 Feb 2021 13:55:06 +0000 http://codingsight.com/?p=11968 Developers are lifelong students. Gaining new knowledge as fast as we can is always our gig. If you’re coming from the T-SQL camp, what’s the faster way to learn MySQL? Often you want to compare syntaxes. Last time, you learned about creating a table in MySQL. Our today’s post will take you a step further. We’ll …

The post MySQL Insert Command vs T-SQL Query Syntax with Examples appeared first on {coding}Sight.

]]>
CREATE TABLE MySQL vs T-SQL with Syntax Examples https://codingsight.com/top-5-mysql-create-table-syntax-for-t-sql-developers/ Thu, 28 Jan 2021 08:43:14 +0000 http://codingsight.com/?p=11823 Are you a T-SQL developer learning the basics of MySQL? Then, one of the things you might want to learn is MySQL CREATE TABLE statement. Besides, the fastest way to learn a new SQL database platform is by comparing its common functionality and syntax. That’s what we are going to do today. But the full syntax is …

The post CREATE TABLE MySQL vs T-SQL with Syntax Examples appeared first on {coding}Sight.

]]>
Your Ultimate Guide to SQL Join: CROSS JOIN – Part 3 https://codingsight.com/your-ultimate-guide-to-sql-join-cross-join/ Fri, 04 Dec 2020 10:30:44 +0000 https://codingsight.com/?p=11049 CROSS JOIN is in the spotlight. This article finishes our small series of SQL JOIN-related publications. If you missed the previous two articles, refer to them as follows:   Your Ultimate Guide to SQL Join – Part 1: INNER JOIN Your Ultimate Guide to SQL Join – Part 2: OUTER JOIN SQL Server CROSS JOIN …

The post Your Ultimate Guide to SQL Join: CROSS JOIN – Part 3 appeared first on {coding}Sight.

]]>
SQL Server Inner Join Basics with Examples https://codingsight.com/sql-server-inner-join-basics-with-examples/ Tue, 10 Nov 2020 14:16:21 +0000 https://codingsight.com/?p=10500 Introduction T-SQL allows us to combine records from more than one table and return them as a single result set. This is achieved through the concept of joins in SQL Server. This opportunity is often necessary because data in relational databases are typically normalized. For example, we have employee data spread across two or more …

The post SQL Server Inner Join Basics with Examples appeared first on {coding}Sight.

]]>