SQL REPLACE: The Top 5 Facts to Find and Replace SQL Texts

Total: 0 Average: 0

Today’s code editors and word processors come with a search and replace feature. It is helpful when you need to change a word or a group of words. We don’t want to throw away our written work for a minor problem or change.

The same thing applies to our data. Users will curse us if we tell them to edit what needs to be renamed. That’s why a search and replace feature is also available to replace texts written in our databases. Here SQL REPLACE comes in.

Read More

The Top 5 Facts About MySQL INSERT for T-SQL Developers

Total: 0 Average: 0

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

Top 5 MySQL CREATE TABLE Syntax for T-SQL Developers

Total: 0 Average: 0

Are you a T-SQL developer learning the basics of MySQL? Then, one of the things you might want to learn is MySQL CREATE TABLE. Besides, the fastest way to learn a new SQL database platform is by comparing its common functionality and syntax.

That’s what we are going to do today. But the full syntax is a lot. So, we will only cover 5 basic points to get you up and running with MySQL CREATE TABLE.

Read More

SQL UNION Cheat Sheet with 10 Easy and Useful Tips

Total: 1 Average: 5

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

Do You Make These Mistakes When Using SQL CURSOR?

Total: 1 Average: 5

For some people, it’s the wrong question. SQL CURSOR IS the mistake. The devil is in the details! You can read all sorts of blasphemy in the entire SQL blogosphere in the name of SQL CURSOR.

If you feel the same way, what made you come to this conclusion?

If it’s from a trusted friend and colleague, I can’t blame you. It happens. Sometimes a lot. But if someone convinced you with proof, that’s a different story.

We haven’t met before. You don’t know me as a friend. But I hope that I can explain it with examples and convince you that SQL CURSOR has its place. It’s not much, but that small place in our code has rules.

Read More

Everything You Need to Know About SQL CTE in One Spot

Total: 1 Average: 5

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

Your Ultimate Guide to SQL Join: CROSS JOIN – Part 3

Total: 0 Average: 0

CROSS JOIN is in the spotlight. This article finishes our small series of SQL JOIN-related publications. If you missed the previous two articles, refer to them as follows:  

SQL Server CROSS JOIN is the simplest of all joins. It implements a combination of 2 tables without a join condition. If you have 5 rows in one table and 3 rows in another, you get 15 combinations. Another definition is a Cartesian Product.

Now, why would you want to combine tables without a join condition? Hang on a bit because we are getting there. First, let’s refer to the syntax.

Read More