Category Archives: SQL Tutorials

Datový skladT-SQL is a language used for working with databases on the MS SQL Server platform. You will find a lot of articles and tutorials about T-SQL in this section. If you want to learn SQL or just remind yourself how to work with SQL function, check out the SQL tutorial. I want every article to contain an example of usage and a code example too. List of Articles in category »

SQL LEFT OUTER JOIN – Joining tables in SQL With Explanation in Excel

When you work with SQL database you usually need more than 1 table. Some values are in one table and the others are in a different one = division of the information into many tables which are connected between each other (via keys) is the principle of relational database. There are 5 basic kinds of… Read More »

SQL RIGHT OUTER JOIN – Joining Tables in SQL With Explanation in Excel + Example

When you work with SQL database you usually need more than 1 table. Some values are in one table and the others are in a different one = division of the information into many tables which are connected between each other (via keys) is the principle of relational database. There are 5 basic kinds of… Read More »

SQL INNER JOIN – Joining Tables in SQL With Explanation in Excel + Examples

When you work with SQL database you usually need more than 1 table. Some values are in one table and the others are in a different one = distribution of data into many tables which are connected between each other (via keys) is the principle of relational database. There are 5 basic kinds of joins:… Read More »

SQL SELECT DISTINCT – Removing Duplicates from Table = Unique values

SELECT DISTINCT is a command used to show unique records in a table. Its use is broad but it is mainly used to remove duplicities in the records when taking multiple views on data. Hint: If we select more than 1 column, DISTINCT will return unique combinations of selected columns SELECT DISTINCT Syntax Syntax is… Read More »

T-SQL Online Quiz – For beginners

Today, I prepared for you an SQL quiz for experienced beginners and slightly advanced. Successful completion of the quiz should be routine for a person who uses SQL on daily basis. This SQL online quiz consists of 15 questions and the line between success and failure is set to 70% of correct answers. Difficulty of… Read More »

SQL INSERT – Inserting Rows into Database Table (3 methods) + Common mistakes

SQL Command INSERT is suitable for situations when we want to insert entries into the table. Insertion of rows can be done in multiple ways (further description below): You can insert the values that you fixedly choose (INSERT INTO … VALUES (value1, value2, …)) You can insert the values into the table using script (SELECT… Read More »

SQL | Triggers in SQL Server – Definition, Types, Syntax and Examples

A trigger is a database object (procedure) that works as a watchdog for certain event. Using database triggers we can catch this event and initiate some additional action – such as logging or rejecting the action. The event that initiates the action may be: INSERT or UPDATE records in the table DELETE records from the… Read More »