Software developer and project manager with a total of 20+ years of software development. His most recent technology preferences include C#, SQL Server BI Stack, Power BI, and Sharepoint. Edwin combines his technical knowledge with his most recent content writing skills to help new breed of technology enthusiasts.
Are you adding MySQL to your list of database skillsets? Then MySQL UPDATE statement is one of the commands you need to learn.
We are continuing our journey to MySQL from the SQL Server point of view. It started with CREATE TABLE, followed by INSERT, and the most recent piece was about DELETE. Today, UPDATE is our focal point.
Thanks to the diversity of cultures on Earth, we have a variety of date formats. For numeric dates, we have month-day-year, day-month-year, and year-month-day. We also have short and long formats. Dates can be mixed with time, which is another story. This reality follows us at work. That’s why the SQL date format is not something we can take easy.
SQL query optimization is a big topic. Each technique or problem needs a separate article to cover the bases. But when you’re just starting to level up your game with queries, you need something simpler to rely on. This is the goal of this article.
Newbie? Then an SQL foreign key may be foreign to you.
You may have heard different opinions about SQL foreign keys. If you haven’t, soon you will. Or your experience will affect your view. The main thing to know is, foreign keys are a must in relational databases.
Yet, some developers may remove or ignore foreign keys when facing some complications. So, what to do? To use the foreign key or not to use it? Will there be times when you won’t need to use them?
This guide is for you to see how important this thing is. You will also know some gotchas in code and learn how to fix them. Besides, of course, we’ll use practical examples. There’s nothing you can’t handle.
Our journey to MySQL started with CREATE TABLE followed by INSERT. Today, we are proceeding to MySQL DELETE. Since you are familiar with T-SQL DELETE, the goal is to make you more productive using the MySQL syntax.
There are minor differences but there’s nothing that you can’t handle. Let’s get started.
You probably know how to insert records into a table using single or multiple VALUES clauses. You also know how to do bulk inserts using SQL INSERT INTO SELECT. But you still clicked the article. Is it about handling duplicates?
“Oops! My bad.” How many times did you say this after an SQL UPDATE had gone wrong? The thing is, if you aren’t careful, a table update can have serious consequences in the form of the DELETE statement. It could become even worse if you complicate it by using UPDATE with JOIN. That’s why you need to think it over before hitting Execute or pressing CTRL-E.
So, today you will learn how to code your SQL UPDATE with JOIN without hassles and never say “Oops! My bad” again.