Blog

Page 392 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for How to declare a variable in a PostgreSQL query

How to declare a variable in a PostgreSQL query

Published on September 2, 2023

# How to Declare a Variable in a PostgreSQL Query ๐Ÿ“Š So, you're trying to declare a variable in PostgreSQL for your query, just like you do in MS SQL Server. Well, you've come to the right place! Let me guide you through this process step by step. ๐Ÿ’ช ##

Cover Image for SQL: difference between PARTITION BY and GROUP BY

SQL: difference between PARTITION BY and GROUP BY

Published on September 2, 2023

# SQL: Understanding the Difference Between PARTITION BY and GROUP BY ๐Ÿ“Š Are you confused about the difference between `PARTITION BY` and `GROUP BY` in SQL? ๐Ÿค” Don't worry, you're not alone! These two clauses may seem similar at first glance, but they act

Cover Image for Can a foreign key be NULL and/or duplicate?

Can a foreign key be NULL and/or duplicate?

Published on September 2, 2023

# Can a Foreign Key be NULL and/or Duplicate? ๐Ÿค”๐Ÿ”‘๐Ÿ’ฅ Are you confused about the use of NULL values and duplicate entries in foreign keys? ๐Ÿคทโ€โ™€๏ธ Don't worry, you're not alone! Many developers find this topic puzzling, and it's essential to understand the i

Cover Image for How can I search (case-insensitive) in a column using LIKE wildcard?
mysql

How can I search (case-insensitive) in a column using LIKE wildcard?

Published on September 2, 2023

### ๐ŸŒณ The Wild Search: Case-Insensitive LIKE in SQL ๐ŸŒณ Searching for specific data in a database is like finding a needle in a haystack ๐Ÿงต๐Ÿ†š. But what if we told you that there's a way to search for data regardless of its casing, making the search proces

Cover Image for SQL query return data from multiple tables
mysql

SQL query return data from multiple tables

Published on September 2, 2023

# ๐Ÿ“ How to Get Data from Multiple Tables in SQL: A Complete Guide Are you struggling to retrieve data from multiple tables in your SQL query? ๐Ÿค” Don't worry, we've got you covered! In this guide, we'll address common issues, provide easy solutions, and h

Cover Image for SQL join: selecting the last records in a one-to-many relationship
indexingjoin

SQL join: selecting the last records in a one-to-many relationship

Published on September 2, 2023

๐Ÿ“ **SQL JOIN: Selecting the Last Records in a One-to-Many Relationship** Are you struggling with selecting the last records in a one-to-many relationship using SQL JOIN? Look no further! In this blog post, I'll provide easy solutions to this common issue

Cover Image for How to select rows with no matching entry in another table?

How to select rows with no matching entry in another table?

Published on September 2, 2023

# How to Select Rows with No Matching Entry in Another Table? ๐Ÿ” Have you ever stumbled upon the problem of finding rows in one table that do not have a matching entry in another table? It can be quite frustrating, especially when dealing with a database

Cover Image for Postgres and Indexes on Foreign Keys and Primary Keys

Postgres and Indexes on Foreign Keys and Primary Keys

Published on September 2, 2023

# Postgres and Indexes on Foreign Keys and Primary Keys: What You Need to Know ๐ŸŽฏ **Introduction:** Postgres is a powerful relational database management system known for its scalability and complex query capabilities. When it comes to optimizing your dat

Cover Image for Rename a column in MySQL
mysql

Rename a column in MySQL

Published on September 2, 2023

# Renaming a Column in MySQL: A Handy Guide ๐Ÿ”„ So, you're trying to rename a column in your MySQL database, but you keep running into roadblocks? Don't worry, we've got just the solution for you! ๐Ÿ’ช ## The Road to Renaming ๐Ÿ›ฃ๏ธ You fire up your MySQL s

Blog | Matheus Mello