Using "sys.objects," we can get a list of tables and stored Procedures created in the Database. SQL Server now supports table-valued parameters, which allow us to send data tables as parameters to Stored Procedures.
T-SQL Stuff Command. Article demonstrates both simple and complex examples of the T-SQL STUFF command and lists a few use cases for which STUFF can be applicable.
The Challenge: Recently I found a quite common request on StackOverflow. Generalizing the problem, it can be described as the requirement of insert some data into a table only if that data is not there already.
The CHARINDEX() function returns the substring position inside the specified string. It works reverse to the SUBSTRING function. The substring() returns the string from the starting position however the CHARINDEX returns the substring position.
Creating T-SQL Query Shortcuts in SQL Server Management Studio(SSMS). Using keyboard shortcuts, it saves time, isn’t it? SQL Server Management Studio is also not an exception !!!. We can add our own custom keyboard shortcuts, that too for T-SQL query.
How to Create Elastic Jobs in Azure SQL Database Using T-SQL. In this episode of Data Exposed, Kate Smith walks us through the process of how to create Elastic Jobs for Azure SQL using T-SQL.
SQL SELECT TOP statement overview and examples. Introduction. The TOP clause allows us to limit the result set of the queries according to the number of rows or the percentage of rows. This article will describe the SQL SELECT TOP statement structure with practical examples.
Programmatically parsing Transact SQL (T-SQL) with the ScriptDom parser. Over the years, I have leveraged the very useful TransactSql ScriptDom .NET library, to programmatically parse Transact-SQL (T-SQL) statements, expressions, and scripts.
Solving the River Crossing problem with SQL Graph. Let’s see if we can solve this classic problem, using T-SQL and the graph capabilities in Azure SQL / SQL Server!
An Overview of User-defined SQL Server Types. An Overview of System Data Types. SQL Server supports various data types for storing different kinds of data. These data types store characters, ... CLR and Spatial data types. This article gives an overview of User-defined SQL Server Types.
Stairway to SQL essentials. This article introduces the basic and important features of SQL in SQL Server. This guide demonstrates the working of SQL starts from creating tables, defining relationships, and writing Transact-SQL (T-SQL) commands, and so on.
Managing your Replication in SQL Server. Replication is one of the oldest technologies on MS SQL Server, loved by every database administrator. Article shows tips and T-SQL scripts to use when you need to check many SQL Agent jobs are created after the replication configuration.
Learn SQL: How to prevent SQL Injection attacks. In this article, we won’t focus so much on data, but rather on the code we could use to prevent SQL injection attacks.
Learn SQL: Dynamic SQL. What is Dynamic SQL? This article will describe a programming technique, Dynamic SQL that you can use to build SQL statements as textual strings and execute them later.
6 Free Microsoft SQL Server and T-SQL Courses. Introduction to Databases and SQL Querying. Advanced Databases and SQL Querying. SQL Server Baby Step. The Ultimate Guide to Becoming a SQL Server DBA. How To Begin Your Career As a SQL Server DBA. Introduction to SQL Server.
Learn SQL: SQL Injection. What is SQL Injection? SQL Injection is a well-known technique used to attack SQL-based applications. In this article, we’ll focus on examples showing how you could exploit database vulnerabilities using this technique.
Your Ultimate Guide to SQL Join: INNER JOIN. This article covers information about SQL Server INNER JOIN including definition of SQL Join, syntax and 10 examples of INNER JOINs.
EXCEPT and INTERSECT operators. Difference between INTERSECT and INNER JOIN. The detailed explanation of INTERSECT and EXCEPT with an example. EXCEPT and INTERSECT operators were introduced in SQL Server 2005. Both are set operators used to combine the result sets.
This tutorial will show the SQL GO command in SQL Server, when to use it and some tips to use it. SQL Server was based on the Sybase database. GO statement was one of the main commands in Sybase inherited by SQL Server and it is still used today.
Manage MDF Files in SQL Server 2019. This article explained types of SQL Server database files (MDF, NDF and LOG files) and how to attach and detach the database using SSMS and T-SQL.