In the realm of database design and key classification, there are a total of nine distinct keys to be taken into account. Primary, foreign, and unique keys are typically well-known among SQL developers, as they are implemented through SQL syntax and serve as constraints. However, when undertaking database design, it is important to take into … Continue reading Understanding Different Key Types in SQL
Tag: SQL
ANY, ALL, and SOME equivalents
The ANY, ALL, and SOME operators in SQL Server are used to compare a value to a set of values. The SOME operator is a synonym for ANY and can be used interchangeably. These operators can be used in a variety of ways, such as with subqueries, to filter and retrieve specific data from a … Continue reading ANY, ALL, and SOME equivalents
Does ChatGPT Know SQL?
Does ChatGPT Know SQL? The short answer is "Yes, but not entirely". While ChatGPT may not be proficient in all aspects of SQL (actually, a lot of aspects of SQL), it is able to generate executable code and perform certain tasks. However, I found it unreliable when I asked about various database topics such as … Continue reading Does ChatGPT Know SQL?
What are the different SQL Server databases used for?
In Microsoft SQL Server, there are several different types of databases that can be created and used for different purposes. Here is a brief overview of some of the most common types of databases in SQL Server and the scenarios in which they are typically used. Databases are categorized into two different types, User and … Continue reading What are the different SQL Server databases used for?
Database Certification List
If anyone wants a list of Database related certifications, I created a list. A couple of things first.... In my list below I have tried to list the certification that is most relevant to a Database Developer, Data Engineer or a Database Administrator role. Most vendor certifications are now role based focused (rather than being … Continue reading Database Certification List
Unbalanced String Puzzle
Here is a fun puzzle that I was recently challenged with. Here we need to determine if a string is balanced if there is a matching opening and closing parenthesis, bracket or brace. Not only does the string need to have a matching parenthesis, bracket or brace, but the matching object also needs to be … Continue reading Unbalanced String Puzzle
Let’s talk about the MERGE statement
In SQL, the MERGE statement is a powerful tool that allows you to perform multiple actions on a single table at once. However, it's not always the best choice and there are several reasons why you might want to consider using separate INSERT, UPDATE, and DELETE statements instead. There are a number of issues that … Continue reading Let’s talk about the MERGE statement
Stored Procedures: Returning Data Using a Result Set
For this article, we are going to examine the benefit of using stored procedures that simply return a result set (i.e. a stored procedure that has a SELECT statement). Before we do a shallow dive into this functionality, it is worth noting that SQL Server has 3 methods of returning data from a stored procedure: … Continue reading Stored Procedures: Returning Data Using a Result Set
SQL Syntax Conventions
If you have always wondered what the different symbols and formatting mean when viewing syntax examples, Microsoft has the following page. Transact-SQL Syntax Conventions (Transact-SQL) - SQL Server | Microsoft Docs It's always a good exercise to go through the DDL statements like below and take stock of which options you understand or need to … Continue reading SQL Syntax Conventions