Community journal

The latest from the MySQL community

Ideas, releases, practical guides, and perspectives from the people building with MySQL.

Follow the feed
Showing entries 51 to 60 of 1188 « Previous | Next »
Displaying posts with tag: sql (reset)
MySQL String Concatenation with CONCAT()

Joining individual pieces of text data into a singular string is nothing new in the programming world and all languages support some form of concatenation. In MySQL, you can use the CONCAT() function. Let’s see how…

Image by Alejandro González from Pixabay 

The Newsletter for PHP and MySQL Developers

Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the …

[Read more]
OpenLampTech #17 – Substack Repost

Do you know what time it is? The time for your weekly PHP/MySQL content is here! Enjoy OpenLampTech issue #17. As always there is plenty to read in this latest issue…

The Newsletter for PHP and MySQL Developers

Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the OpenLampTech newsletter.

Image by Clker-Free-Vector-Images from  …

[Read more]
MySQL NULL value transformation with COALESCE() – Medium repost

Being mindful of NULL values is a good practice. NULLs can slip up on you and give you a heck of a time (especially in calculations) if you aren’t careful. In this post, we will see examples of NULLtransformation with the MySQL COALESCE() function.

Do you want to learn how to use MySQL but are not sure of where to start? I am creating premium MySQL Beginners content to help anyone understand the basics of using MySQL. Get a short, actionable email tip each week and more information on the premium articles and content as they are released.

Tell me more!

Image by  …

[Read more]
Quick SQL Snippets in MySQL Workbench

Supercharge your productivity in MySQL Workbench with these ‘click and paste’ SQL code snippets available for any table in a schema. Continue reading and see the ‘Staple Five‘…

Do you need to learn MySQL? Just starting and confused about how to query a table and get the data you need? I am creating premium MySQL Beginners content for this specific reason. To help those who want to learn the basics of MySQL but don’t know where to start. Learn more about the premium blog posts as I develop and release them.

Tell me more!

Self-Promotion:

If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me …

[Read more]
OpenLampTech issue #15 – CodeIgniter 4 select() methods in depth

Sit back, grab your beverage of choice, and get ready for a deep-dive issue of OpenLampTech, the newsletter for PHP/MySQL developers. This month’s featured piece covers select-like methods in the CodeIgniter 4 Query Builder class. Thanks for being here to read the publication

The Newsletter for PHP and MySQL Developers

Receive a copy of my ebook, “10 MySQL Tips For Everyone”, absolutely free when you subscribe to the OpenLampTech newsletter.

Take your time with this week’s issue of the OpenLampTech featured piece.

There is original and curated content …

[Read more]
Create a comma-separated list with MySQL GROUP_CONCAT()

In this blog post, we will learn how to group sets of values into a comma-separated list, for each group, using the MySQL GROUP_CONCAT() function. Continue reading for more information…

Do you need to learn MySQL? Just starting and confused about how to query a table and get the data you need? I am creating premium MySQL Beginners content for this specific reason. To help those who want to learn the basics of MySQL but don’t know where to start. Learn more about the premium blog posts as I develop and release them.

Tell me more!

Self-Promotion:

If you enjoy the content written here, by all means, share this blog and your favorite post(s) with others who may benefit from or like it as well. Since coffee is my favorite drink, you can even buy me one if you would like!

[Read more]
OpenLampTech issue #14

Rolling right along this week with another loaded issue of OpenLampTech, the newsletter for PHP/MySQL developers. Glad to have you here reading this week’s issue.

Do you need to learn MySQL? Just starting and confused about how to query a table and get the data you need? I am creating premium MySQL Beginners content for this specific reason. To help those who want to learn the basics of MySQL but don’t know where to start. Learn more about the premium blog posts as I develop and release them.

Tell me more!

Image by …

[Read more]
Counting with countAll() and countAllResults() in CodeIgniter 4

Getting a count of table or query rows in CodeIgniter 4 is quite easy using either of the Query Builder countAll() or countAllResults() functions. Continue reading to see examples of each…

Do you need to learn MySQL? Just starting and confused about how to query a table and get the data you need? I am creating premium MySQL Beginners content for this specific reason. To help those who want to learn the basics of MySQL but don’t know where to start. Learn more about the premium blog posts as I develop and release them.

Tell me more!

Image by  …

[Read more]
Dynamic Drop Table

I always get interesting feedback on some posts. On my test case for discovering the STR_TO_DATE function’s behavior, the comment was tragically valid. I failed to cleanup after my test case. That was correct, and I should have dropped param table and the two procedures.

While appending the drop statements is the easiest, I thought it was an opportunity to have a bit of fun and write another procedure that will cleanup test case tables within the test_month_name procedure. Here’s sample dynamic drop_table procedure that you can use in other MySQL stored procedures:

CREATE PROCEDURE drop_table
( table_name  VARCHAR(64))
BEGIN
 
  /* Declare a local variable for the SQL statement. */
  DECLARE stmt VARCHAR(1024);
 
  /* Set a session variable with two parameter markers. */
  SET @SQL := CONCAT('DROP TABLE ',table_name);
 
  /* Check if the …
[Read more]
str_to_date Function

As many know, I’ve adopted Learning SQL by Alan Beaulieu as a core reference for my database class. Chapter 7 in the book focuses on data generation, manipulation, and conversion.

The last exercise question in my check of whether they read the chapter and played with some of the discussed functions is:

  1. Use one or more temporal function to write a query that convert the ’29-FEB-2024′ string value into a default MySQL date format. The result should display:
    +--------------------+
    | mysql_default_date |
    +--------------------+
    | 2024-02-29         |
    +--------------------+
    1 row in set, 1 warning (0.00 sec)
    

If you’re not familiar with the behavior of MySQL functions, this could look like a difficult problem to solve. If you’re risk inclined you would probably try the STR_TO_DATE function but if you’re not risk inclined the description of the %m specifier might suggest you …

[Read more]