Home » mysql

Tag Archives: mysql

SQL IF Statement Example

1. Introduction Structured Query Language (SQL) supports the IF statement like any other programming language. The IF statement tests a boolean expression. If the expression is true, then the block of statements associated with the IF statement is executed. It can also be used with an ELSE statement; In this example, I will demonstrate how to: Use the IF function ...

Read More »

How to Create a Table in MySQL

In this article, we explain how to create a table in MySQL. 1. Introduction MySQL database is used by developers as a database. Data can be read by different applications from the MySQL database. MySQL database is an open-source relational database. 2. MySQL Database – Table Creation Mysql database is used for data creation and storing the data. 2.1 Prerequisites ...

Read More »

Date Format in SQL

In this article, we will explain the Date Format in SQL. 1. Introduction Structured Query Language (SQL) defines the date and time data types. In this example, I will use the MySQL database to demonstrate both date data types and corresponding utility functions. DATE – stores a calendar date in the YYYY-MM-DD format. The valid date ranges from ‘0000-01-01‘ to ...

Read More »

How to Download and Install MySQL

In this article, we’re going to see how to download and install MySQL using the default installer. Also, we’ll set up the server using the auto start package and do some examples. 1. Download MySQL Installer As Linux/macOS-based system user, I commonly use a package manager like Home Brew and APT in the terminal to install software that I need. ...

Read More »

MySQL UPDATE Statement

In this example, I will demonstrate how to use the UPDATE statement to modify values using MySQL. 1. Introduction MySQL is an open-source relational database management system. Here is the UPDATE statement syntax: UPDATE {table_name} SET {assignment_list} [WHERE where_condition] {table_name} – the table name.{assignment_list} – one or more assignments which update records.[WHERE where_condition] – optional condition. 2. Technologies Used The ...

Read More »

SQL SUBSTRING Function

In this article, we’re going to explain the SUBSTRING function in SQL. 1. Introduction The SUBSTRING function is available in SQL Server (from 2008 edition) and MySQL (from version 4.0) as a part of String functions. Using this function we’re able to manipulate strings directly with a SQL query. Also, in combination with other functions and procedures, the SUBSTRING function ...

Read More »

MySQL with Node.js and Express.js

Hello in this tutorial, we will understand how to create a RESTful API in a Node.js environment running on an Express.js server and using a MySQL database. The tutorial will cover the CRUD operations on the API which will execute the corresponding database commands. 1. Introduction RESTful API stands for the standard web service interface used by the applications to ...

Read More »

SQL Between, MySQL Between Dates, Not Between

In this example, we will see how to use the BETWEEN operator included in the SQL. 1. Introduction The BETWEEN is a logical operator, often used in the WHERE clause of the SELECT, UPDATE, and DELETE statements, and gives us the ability to specify whether a value is in a given range or not. Syntax SELECT column_name(s) FROM table_name WHERE column_name ...

Read More »

CRUD Operations in Python on MySQL

Hello in this tutorial, we will understand how to perform CRUD operations to the MySQL server via python programming. 1. Introduction To connect with MySQL in python programming we have the following modules that are commonly available and known to the developer world as all these modules adhere to the python database API specification – MySQL Connector Python – It ...

Read More »

Python Execute MySQL Stored Procedure

Hello in this tutorial, we will understand how to connect to the MySQL database and call the stored procedures via python programming. 1. Introduction To connect with MySQL in python programming we have the following modules that are commonly available and known to the developer world as all these modules adhere to the python database api specification – MySQL Connector ...

Read More »