Mysql Tricks

Browse latest tricks and tips on Mysql.

Is it possible to perform an outer join between temporary tables?

Yes, temporary tables can be joined outside. In MySQL, you can create temporary tables with CREATE TEMPORARY TABLE , but these temporary tables can be outer-joined just like r ...
published on : 15 hours ago 12 Comments

What is the initial value of a local variable in a stored procedure in Mysql?

If a MySQL stored procedure or function declares a local variable that is valid only within the process, and if you do not specify an initial value in the DEFAULT clause, the local ...
published on : 2 days ago 12 Comments

Connect to MySQL from the command line

How to connect to MySQL from the command line?To operate MySQL from the command line, you must first connect to MySQL.Use the following mysql command to connect to MySQL Server.mys ...
published on : 2 days ago 12 Comments

Maximum value of AUTO_INCREMENT in Mysql

What is the maximum value of AUTO_INCREMENT?The maximum value for AUTO_INCREMENT is the same as the maximum value for the column data type.However, in the case of BIGINT unsigned, ...
published on : 1 day ago 12 Comments

What is the first number assigned to AUTO_INCREMENT?

In MySQL, when automatic numbering is done with AUTO_INCREMENT, automatic numbering is started from 1 instead of 0. After 1, increment by 2, 3 and 1, and assign numbers sequentiall ...
published on : 14 hours ago 12 Comments

MySQL Query where DateTime is greater than today

How to get records in Mysql where datetime is > than todaySample Mysql query to rows where datetime is than today or nowSELECT *  FROM your_table  WHERE created_dat ...
published on : 17 hours ago 12 Comments

MySQL where date last 7 days

MySQL query to get records of last 7 day.In this example we will see a sample query to get last 7 days records from mysql table.Select * from your_table where created_date >= DA ...
published on : 2 days ago 12 Comments

Where stored procedures stored in MySQL

In MySQL Stored procedures are supported after release of MySQL version 5.0. Stored procedures are set of SQL statements that are stored on server. So question is actually where or ...
published on : 20 hours ago 12 Comments

MySQL WHERE, AND & OR syntax

How to use WHERE, AND & OR syntax in mysql query together?Below we have provide example query to use WHERE, AND & OR syntax in MySQL.SELECT * FROM your_table   & ...
published on : 1 day ago 12 Comments