JIYIK CN >

Current Location:Home > Learning > DATABASE >

All

Insert timestamp into MySQL table

Publish Date:2025/04/23 Author:JIYIK Category:MySQL

Today, we will learn how to TIMESTAMP insert date and time into a type column of a MySQL table according to the table definition. Create a MySQL table First, we will create the tables that we will use in this tutorial. Sample code: CREATE T...

Full

Select first row from MySQL table

Publish Date:2025/04/23 Author:JIYIK Category:MySQL

Today, we will explore three scenarios and their solutions where we want to select the first row from a MySQL table. In the first scenario, we will learn to get the first row from a MySQL table where there are multiple instances of a partic...

Full

Display tables and database structure in MySQL

Publish Date:2025/04/23 Author:JIYIK Category:MySQL

Today, we will learn about queries in MySQL that can display the table and database structure. We will use the mysqldump utility, DESCRIBE the , SHOW TABLES and SHOW CREATE TABLE the statements. We are using MySQL version 8.0.28 while writi...

Full

Datepart function alternative in MySQL

Publish Date:2025/04/22 Author:JIYIK Category:MySQL

The SQL datepart function extracts a part of the datetime data type and is used to filter or aggregate table fields in SQL databases. However, it is not directly available in MySQL. Datepart Function alternatives in MySQL datepart There are...

Full

Deleting all rows in a MySQL database using phpMyAdmin

Publish Date:2025/04/22 Author:JIYIK Category:MySQL

We will learn the best way to delete all rows in a database using DELETE. We will explore phpMyAdmin the command to delete rows from a given table. MySQL DELETE We will also learn the difference between the DELETE , , DROP and TRUNCATE comm...

Full

MySQL Cascade Delete

Publish Date:2025/04/22 Author:JIYIK Category:MySQL

In MySQL parlance, a constraint is a set of rules enforced on a table to prevent certain anomalies. These exceptions will result in error records in the table. Constraints can be of various types based on the behavior of the failure. They a...

Full

Inserting into multiple tables in MySQL

Publish Date:2025/04/22 Author:JIYIK Category:MySQL

This article will introduce transactions and stored procedures for inserting into multiple tables in MySQL. Inserting into multiple tables in MySQL It is not possible to insert into multiple tables with a single MySQL command, but we can us...

Full

Grouping a datetime column by date only in MySQL

Publish Date:2025/04/22 Author:JIYIK Category:MySQL

This article uses the GROUP BY clause, COUNT() and DATE() functions to group DATETIME type columns by DATE only in MySQL. Use GROUP BY, COUNT(), and DATE() in MySQL to group a DATETIME column by DATE only Before we proceed, remember that DA...

Full

MySQL currency data type

Publish Date:2025/04/22 Author:JIYIK Category:MySQL

This article introduces the DECIMAL(P,D) data type which is best suited for storing monetary values ​​in MySQL. MySQL currency data type Monetary values ​​need to be represented accurately. We don't need to use only approximate data...

Full

Get the current date and time in MySQL

Publish Date:2025/04/22 Author:JIYIK Category:MySQL

In this article, we will learn about NOW(), CURRENT_TIMESTAMP() (also written as CURRENT_TIMESTAMP), and SYSDATE() to get the current date and time in MySQL. We will also see a comparison between these three functions. Get the current date...

Full

Convert to decimal in MySQL

Publish Date:2025/04/22 Author:JIYIK Category:MySQL

Sometimes, we may need to convert one data type to another. Here is how we can DECIMAL(M,D) convert to decimal in MySQL using CAST() and CONVERT() functions with . Using CAST() with the DECIMAL(M,D) function to convert to decimal in MySQL W...

Full

Installing MySQL Client in Linux

Publish Date:2025/04/22 Author:JIYIK Category:MySQL

MySQL is an abbreviation for Structured Query Language which is a relational database management system. It is an open source database which is freely available and used for both large and small applications. The use cases are in school app...

Full

Different ways to connect to a remote MySQL server using Ubuntu

Publish Date:2025/04/22 Author:JIYIK Category:MySQL

In this article we will learn how to connect to a remote MySQL server using Ubuntu to manipulate data and start and stop the MySQL server. Different ways to connect to a remote MySQL server using Ubuntu Data operations from Ubuntu 20.04 cli...

Full

The equivalent of Oracle's decode function in MySQL

Publish Date:2025/04/22 Author:JIYIK Category:MySQL

This article presents three alternative implementations that we can use as the equivalent of Oracle's decode() function in MySQL. To do this, we will use IF(), CASE, and a combination of FIELD() and ELT(). MySQL equivalent of Oracle's decod...

Full

Update the primary key in a MySQL table

Publish Date:2025/04/22 Author:JIYIK Category:MySQL

This article explains how to update the primary key in a MySQL table. We will use the ALTER command to make any changes to the primary key. Update the primary key in a MySQL table We can update the primary key in a MySQL table in multiple s...

Full

Scan to Read All Tech Tutorials

Social Media
  • https://www.github.com/onmpw
  • qq:1244347461

Hottest

Tags

Scan the Code
Easier Access Tutorial