AmitDiwan has Published 10744 Articles

Using User-Defined Variables in MySQL

AmitDiwan

AmitDiwan

Updated on 09-Mar-2021 13:14:48

342 Views

Let us understand what user variables are and how they can be used in MySQL. We will also see the rules −User variables are written as @var_name. Here, the ‘var_name’ refers to variable name, which consists of alphanumeric characters, ., _, and $.A user variable name can contain other characters ... Read More

The Rows Holding the Group-wise Maximum of a Certain Column in MySQL

AmitDiwan

AmitDiwan

Updated on 09-Mar-2021 13:13:27

407 Views

Let us understand how to find the rows that hold the group wise maximum of a specific column in MySQL −The syntax to find the rows that hold the group-wise maximum of a specific column in MySQL is as follows −SELECT colName1, colName2, colName3 FROM tableName s1 WHERE colName3=(SELECT MAX(s2. ... Read More

Maximum of Column per Group in MySQL

AmitDiwan

AmitDiwan

Updated on 09-Mar-2021 13:11:12

126 Views

Let us understand how to find the maximum of a column per group in MySQL −SELECT colName1, MAX(colName2) FROM tableName GROUP BY colName1 ORDER BY colName1;We will now see a live example. Let’s say we have a table PRODUCT −+---------+--------+ | Article | Price  | +---------+--------+ | 1     ... Read More

Major Contributors to MySQL

AmitDiwan

AmitDiwan

Updated on 09-Mar-2021 07:26:40

245 Views

Let us see who the major contributors to MySQL are −Although Oracle Corporation and/or its affiliates own all copyrights in the MySQL server and the MySQL manual, we wish to recognize those who have made contributions of one kind or another to the MySQL distribution. Contributors are listed here, in ... Read More

Upgrading MySQL Binary or Package-based Installations on Unix/Linux

AmitDiwan

AmitDiwan

Updated on 09-Mar-2021 07:24:51

325 Views

Let us understand how MySQL binary and package-based installations can be upgraded in Unix or Linux. This can be done in-place as well as by using a logical upgrade method. Let us understand both these methods in brief −In place upgradeAn in−place upgrade involves shutting down the old MySQL server, ... Read More

How To Check MySQL Version

AmitDiwan

AmitDiwan

Updated on 09-Mar-2021 07:23:43

810 Views

Let us understand how to check the version of MySQL that the user is currently running −Before entering queries on the console, it is important to ensure that the user is connected to the server.Check MySQL VersionThe below query would give the version number of the server being used, and ... Read More

Installing MySQL from source on linux

AmitDiwan

AmitDiwan

Updated on 09-Mar-2021 07:22:31

609 Views

Linux supports many different methods to install MySQL. Only one of the distributions from Oracle needs to be used out of the many installations available.StepsType − Apt, set up method−Enable the MySQL Apt repositoryType − Yum, set up method−Enable the MySQL Yum repositoryType − Zypper, set up method−Enable the MySQL ... Read More

Dealing with Problems Compiling MySQL

AmitDiwan

AmitDiwan

Updated on 09-Mar-2021 07:21:08

201 Views

Some problems with compiling MySQL could be because of not configuring properly. Hence, the solution is to reconfigure.If CMake is run right after it was previously run, there is a possibility that it would use information that was gathered from its previous call. This information is present in CMakeCache.txt. When ... Read More

Getting Information About MySQL Databases and Tables

AmitDiwan

AmitDiwan

Updated on 09-Mar-2021 06:58:50

208 Views

It is possible for the user to forget the name of the database or table or the structure of table or the name of the columns. This issue can be solved using MySQL since it supports many statements that provide information about the databases and tables which it supports.The ‘SHOW ... Read More

List down all the Tables in a MySQL Database

AmitDiwan

AmitDiwan

Updated on 09-Mar-2021 06:55:07

732 Views

Let us understand how to list down all the tables in a MySQL database −Once a database is created, we can access and use a specific database, using the following query −Querymysql> USE databaseName Database changedThe ‘USE’ statement doesn’t require a semi-colon. This is similar to the ‘QUIT’ statement. Even ... Read More

Advertisements