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 insert records with MySQL INSERT.Read More
The right application of the DELETE statement for data removal is crucial, and it involves lots of issues. Still, there are standard practices of the DELETE statement usage that simplify all such tasks.
This article will explore some of the professional life scenarios to equip you with the most helpful tips to use the DELETE statement correctly. You can remove data from a table in different ways. Explore the difference between DELETE and TRUNCATE in SQL Server that has been covered with practical examples.Read More
Many articles have been written to describe the difference between the SQL DELETE and SQL TRUNCATE statements. Moreover, it is one of the most common questions during job interviews. Both statements remove the data from the table. However, there are differences too.
This article will focus on these differences and illustrate them with practical examples.Read More
Having a hard time with SQL UNION? It happens if the results you combined put your SQL Server into a standstill. Or a report that’s been working before pops up a box with a red X icon. An “Operand type clash” error occurs pointing to a line with UNION. The “fire” starts. Sounds familiar?
Whether you’ve been using SQL UNION for a while or just start it out, a cheat sheet or a concise set of notes won’t hurt. This is what you are going to get today in this post. This list offers 10 useful tips for both newbies and veterans. Also, there will be examples and some advanced discussions.Read More
This article briefly explains creating a new database with the New Database wizard of SQL Server Management Studio (SSMS).
The SQL Server Management Studio is a graphical interface tool for creating, configuring, and administrating SQL Server engines and databases. You can download it from here.Read More
Datafiles are physical objects that constitute the most important part of the database system since they contain actual data. You can think of a database as a collection of data files. An instance gives you the means of mounting and accessing such files.
Here, managing datafiles is understanding how to monitor and resize existing datafiles and how to add or remove the data files from a database.Read More
The SQL Server MERGE statement is an incredibly useful tool for carrying out DML operations based on comparing two tables or two data sets. Usage of this statement is actually like performing multiple operations in a single statement.
This article will explore three use cases that border on ensuring data between an online table and a history table in sync.Read More
An SQL Server database contains primary data files, secondary data files (optional), and transaction log files.
The primary and secondary datafiles contain tables, database objects, schema, and data.
The file extension of the primary database file is *.mdf, and the file extension of the secondary data file is *.ndf.
The transaction log files store all the changes made by the transactions (insert, update, and delete). If the SQL Server restarts unexpectedly or crashes, the database engine rolls the incomplete transaction back before the point of failure using the Transaction log file.
The extension of the transaction log file is *.ldf. You might want to refer to this article to understand the Transaction Log Files architecture.
In this article, I am going to explain how we can manage the database files (MDF files) in SQL Server 2019.Read More
The first time Karl heard of SQL Server CTE was when he was looking for something to make his SQL code easier for the eye. It’s kind of a headache when you look at it. Anton, his concerned colleague, asked him about CTE. Karl thought Anton was referring to his headache. Maybe he heard it all wrong, so he answered, “Of course not.” The funny thing is, he was referring to Chronic Traumatic Encephalopathy, also a CTE – a neurodegenerative disease caused by repeated head injuries. But based on Karl’s response, Anton knew for sure that his colleague was clueless about what he was saying.
What a crazy way to introduce CTEs! So, before you get into the same boat, let’s clarify, what is SQL CTE or Common Table Expressions in the SQL world?
You can read the basics here. Meanwhile, we’ll learn a bit more about what happened in this unusual story.Read More
This article talks about the practical use of the SQL COALESCE function regarding some professional life scenarios. It highlights the importance of correct and in-time use of this function to address the database-related problems.
Additionally, we will implement the particular steps required to solve the problems with the help of this function.Read More