One of the most important things in databases is to understand the types of relations in the databases. That stands for both – a process of designing a database model as well as when you’re analyzing your data. Understanding these relations is somehow natural and not so complex but is still essential in the database theory (and practice).
Read more »Languages and coding
Database Mail configuration in SQL Server Express edition
January 21, 2020In this article, I am going to explain step by step process to perform Database Mail configuration in SQL Server Express edition using the T-SQL script. As we know, SQL Server Express edition does not provide the SQL Server Agent Services; hence we cannot perform Database Mail configuration or SQL Jobs or maintenance plans using SQL Server Management Studio. To configure the Database Mail feature in the SQL Server Express edition, we must use CLR integration or using stored procedures within the MSDB database.
Read more »Understanding the interaction between Set Theory and Set Operators in SQL Server
January 21, 2020In this article, we will describe the relation between the Set Theory and SQL Server Set Operations
Read more »Learn SQL: SQL Scripts
January 21, 2020I can hardly imagine making any complex database changes without using SQL scripts. We actually used them in this series so far, but we haven’t pointed out what they actually are. Today we’ll stand up against that injustice. Sit back, relax, and get ready to learn something new and useful.
Read more »Configuring SQL Server Express edition as SQL witness server in Database Mirroring
January 20, 2020In this article, I am going to explain how we can use the SQL Server Express edition for the SQL witness server of the database mirroring setup. Database mirroring is a cost-effective and easy to configure high availability solution. Unfortunately, this feature has been deprecated, but still, some organizations use database mirroring as a high availability solution.
Read more »Import JSON data into SQL Server
January 17, 2020This article explores the process of JSON data import in the SQL Server table using T-SQL and SSIS.
Read more »Learn SQL: INNER JOIN vs LEFT JOIN
January 16, 2020INNER JOIN vs LEFT JOIN, that is the question. Today, we’ll briefly explain how both of these two join types are used and what is the difference. We’ll go through this topic again later when we’ll expand our model and be able to write much more complex queries.
Read more »An overview of the CONCAT function in SQL with examples
January 13, 2020In this article, we will explore the syntax, working mechanism and other details of the CONCAT function in SQL and we will also make up various different examples about it.
Read more »Yet another bunch of SQL string functions
January 13, 2020This article is a supplement to the previously published article, An overview of SQL String Functions . This time, we will describe another bunch of SQL string functions used in SQL Server.
Read more »Learn SQL: SELECT statement
January 13, 2020The SELECT statement is probably the most important SQL command. It’s used to return results from our database(s) and no matter how easy that could sound, it could be really very complex. In this article, we’ll give an intro to the SELECT statement and we’ll cover more complex stuff in the upcoming articles.
Read more »Linking relational databases with OLAP cubes
January 10, 2020One of the most asked questions is how to link an OLAP cube with a relational database, or in another way how to join the result of an MDX query with a table stored in a relational database.
Read more »Introduction to the sp_executesql stored procedure with examples
January 9, 2020The sp_executesql is a built-in stored procedure in SQL Server that enables to execute of the dynamically constructed SQL statements or batches. Executing the dynamically constructed SQL batches is a technique used to overcome different issues in SQL programming sometimes. For example, when we want to determine the displayed columns in our reports, this procedure might be a solution option for us. In the simplest sense, this procedure takes a dynamically constructed SQL batch and other parameters, then execute it in the runtime and, finally, it returns the result.
Read more »Learn SQL: Foreign Key
January 7, 2020In the previous article, we talked about the primary key (PK). In this one, we’ll check what is the foreign key (FK) and how it’s related to the primary key. This is the final step, after creating tables, inserting data, and defining primary keys, to cover all basics related to the database theory. There is much, much more than this, but if you understand these concepts, everything else is just expanding your knowledge around these basics.
Read more »Encrypting passwords with Python Scripts in SQL Notebooks of Azure Data Studio
January 6, 2020This article explores the Python scripts for encrypting and decrypting passwords in SQL Server using Azure Data Studio SQL Notebooks.
Read more »An overview of the STRING_AGG function in SQL
January 3, 2020In this article, we will explore the STRING_AGG function in SQL and we will also reinforce our learning with various examples. STRING_AGG function can be counted as a new member of the SQL aggregation functions and it was announced in SQL Server 2017. STRING_AGG function gathers all expression from rows and then puts it together in these rows expression in order to obtain a string. Additionally, this function takes a separator parameter that allows separating the expressions to be concatenated.
Read more »Rollback SQL: Rolling back transactions via the ROLLBACK SQL query
December 26, 2019The rollback SQL statement is used to manually rollback transactions in MS SQL Server.
Read more »Use Python SQL scripts in SQL Notebooks of Azure Data Studio
December 25, 2019This article explores the Python SQL scripts in SQL Notebook of Azure Data Studio.
Read more »SQL Injection: Introduction and prevention methods in SQL Server
December 25, 2019A SQL injection attack is one of the most commonly used hacking techniques. It allows hacks to access information from a database that is otherwise not publically accessible.
Read more »An overview of SQL String Functions
December 25, 2019In this article, we will try to give a brief overview of the SQL string functions used in SQL Server and we will provide some examples.
Read more »Understanding the SQL EXCEPT statement with examples
December 23, 2019The SQL EXCEPT statement is one of the most commonly used statements to filter records when two SELECT statements are being used to select records.
The SQL EXCEPT statement returns those records from the left SELECT query, that are not present in the results returned by the SELECT query on the right side of the EXCEPT statement.
Read more »Learn SQL: Primary Key
December 20, 2019If you’ve already worked with databases, then you could hardly miss the term – Primary Key (PK). And if you’re reading this series and use it to learn about databases, well, this article should give you a good overview of what the PK really is. Still, if you’re a database expert, maybe you’ll find something new or just refresh your knowledge. So, sit back, relax, and let’s dive into PKs.
Read more »Replace a SQL While loop and a cursor with ranking functions in SQL Server for better query performance
December 19, 2019SQL While loop and cursor are the most common approach to repeat a statement on condition-based or determined limits. Loop and cursor can be utilized in a circumstance to deal with row-based processing in T-SQL. We generally observe moderate execution of old made procedures, which are composed of using loop and cursors. Those procedures take time, especially when the number of iteration count is big for the execution.
Read more »How to create a view in SQL Server
December 16, 2019In this article, we will learn the basics of the view concept in SQL Server and then explore methods to create a view in SQL using T-SQL and SQL Server Management Studio.
Read more »Learn SQL: INSERT INTO TABLE
December 12, 2019In the previous article, we’ve created two tables, and now we’re ready to use the SQL INSERT INTO TABLE command and populate these tables with data. In order to do so, we’ll prepare statements in Excel and then paste these statements into SQL Server and execute them. We’ll also check the contents of both tables before and after these commands using the SELECT statement. So, let’s start.
Read more »An overview of SQL Server data types
December 9, 2019In this article, we will give an overview of various SQL Server data types.
Read more »