How to use Limit in MySQL Query - MySQL Developer Tutorial
How to use Limit in MySQL QueryLimit is used to restrict the number of rows you want to returned by select statement in MySQL. Tables can have thousands or millions of rows and sometime we need to only...
View ArticleSelect random records using ORDER BY RAND() in MySQL - MySQL Developer Tutorial
Select random records using ORDER BY RAND() in MySQL Scenario : Let's say you are working as MySQL Developer and you are asked to provide some sample data from a table. You need to provide 10 rows or...
View ArticleUnion in MySQL - MySQL Developer Tutorial
Union in MySQL MySQL Union operation is used to combine two or more result sets. Before you use UNION operator in MySQL or MariaDB, you need to remember couple of things.UNION result set will be...
View ArticleUnion ALL in MySQL - MySQL Developer Tutorial
Union ALL in MySQL MySQL Union ALL operation is used to combine two or more result sets. Before you use UNION ALL operator in MySQL or MariaDB, you need to remember couple of things.UNION ALL will...
View ArticleUsing Union and order by clause in MySQL - MySQL Developer Tutorial
Using Union and order by clause in MySQLUnion or Union all is used to combine two or more result sets. We often need to return the output in sorted form after combining the results. There are different...
View ArticleHow to Add Auto_Increment column to existing Table - MySQL Developer Tutorial
How to Add Auto_Increment column to existing TableIt is very simple process to add Auto Increment column to existing table in MySQL. Let's say if you have a table with below definition and there is...
View ArticleHow To Reset MySQL Autoincrement Column - MySQL Developer Tutorial
How To Reset MySQL Auto- increment ColumnAuto Increment is feature in MySQL that enabled the column in the table to increment automatically. Once you create the column with Auto increment,the value...
View ArticleHow to drop or disable Auto_Increment Property of column in MySQL Table -...
How to drop or disable Auto_Increment Property of column in MySQL TableLet's say that you have created auto increment on a column in MySQL table. You need to disable or remove it. You don't want to...
View ArticleHow to add Computed Column / Generate Column in MySQL Table - MySQL Developer...
How to add Computed Column / Generate Column in MySQL TableComputed Column or Generate Column is column which is calculated from exiting columns. Let's say if we have a table called customer with...
View ArticleHow to add column to all tables in MySQL Database - MySQL Developer Tutorial
How to add column to all tables in MySQL DatabaseLet's say that you are working as MySQL Developer and you need to provide script to add a new column to all tables in MySQL Database. You can use system...
View ArticleHow to Rename Column in all tables in MySQL Database - MySQL Developer Tutorial
How to Rename Column in all tables in MySQL DatabaseLet's say you have a column that is part of all the tables and you need to generate script to rename as MySQL Developer. You can use below script to...
View ArticleHow to use Sorting ( Order By) in Select Statement in MySQL - MySQL Developer...
How to use Sorting ( Order By) in Select Statement in MySQL Scenario : You are working as MySQL developer, you need to output sorted data. Which Key words you would like to use in MySQL To output...
View ArticleHow to use Like Operator in MySQL and MariaDB - MySQL Developer Tutorial
How to use Like Operator in MySQL and MariaDBLIKE logical operator is used when we want to return the row if operand matches a pattern. Like operator returns TRUE if the operand matches a...
View ArticleHow to use Group by in MySQL Or MariaDB To Group Data - MySQL Developer Tutorial
How to use Group by in MySQL Or MariaDB To Group DataYou are working as MySQL Developer. You have a Customer table which has CountryShortName and SaleAmount. You are asked to write a query that should...
View ArticleHow to use Min and Max Function in MySQL or MariaDB - MySQL Developer Tutorial
How to use Min and Max Function in MySQL or MariaDBScenario:Let's say you are working as MySQL Developer, you have Customer table with SaleAmount. You are asked to write a query that should return Max...
View ArticleHow to use OR Operator in MySQL - MySQL Developer Tutorial
How to use OR Operator in MySQLLogical Operators are used to test some conditions. If the condition is true, the row will be selected for output.What is OR Logical Operator : OR logical operator is...
View ArticleWhat is AND Operator in MySQL - MySQL Developer Tutorial
What is AND Operator in MySQLLogical Operators are used to test some conditions. If the condition is true, the row will be selected for output.What is AND Logical Operator : Logical AND operator is...
View ArticleWhat is Foreign Key Constraint in MySQL and How to create Foreign Key in...
What is Foreign Key Constraint in MySQL and How to create Foreign Key in MySQLForeign Key in a table is a column or group of columns that provides a link between data in two tables. The Foreign Key in...
View ArticleHow to use BETWEEN and NOT BETWEEN Operation in MySQL - MySQL Developer Tutorial
What is BETWEEN Logical Operator in SQL ServerBETWEEN returns TRUE if the operand is within range. BETWEEN logical operator is used when we want to return the row if operand is within range.Scenario:...
View ArticleHow to create after delete trigger in MySQL - MySQL Developer Tutorial
How to create after delete trigger in MySQLOften we want to know who has deleted the records from table. In MySQL we can use After Delete Trigger to capture deleted row and insert into some audit...
View Article