Top "Mysql" questions

MySQL is a free, open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL).

Get a list of dates between two dates

Using standard mysql functions is there a way to write a query that will return a list of days between …

mysql sql date gaps-and-islands
Declaring and using MySQL varchar variables

I'm trying to do some simple manipulations with variables in MySQL 5.0 but I can't quite get it to work. I've …

sql mysql mysql-error-1064
CodeIgniter: How To Do a Select (Distinct Fieldname) MySQL Query

I'm trying to retrieve a count of all unique values in a field. Example SQL: SELECT count(distinct accessid) FROM (`…

php mysql codeigniter distinct
How do I use properly CASE..WHEN in MySQL

Here is a demo query, notice it is very simple, Fetches only where base_price is 0, And still, it chooses …

mysql sql conditional switch-statement case
MySql Query Replace NULL with Empty String in Select

How do you replace a NULL value in the select with an empty string? It doesnt look very professional to …

mysql string replace null
ERROR 1148: The used command is not allowed with this MySQL version

I am trying to load data into mysql database using LOAD DATA LOCAL INFILE A.txt INTO DB LINES TERMINATED …

mysql sql import
MySQL wait_timeout Variable - GLOBAL vs SESSION

SHOW VARIABLES LIKE "%wait%" Result: 28800 SET @@GLOBAL.wait_timeout=300 SHOW GLOBAL VARIABLES LIKE "%wait%" Result: 300 SHOW SESSION VARIABLES LIKE "%wait%" …

mysql global-variables session-variables
MYSQL query between two timestamps

I have the following entry in my DB table eventName(varchar 100) -> myEvent date(timestamp) -> 2013-03-26 09:00:00 …

mysql unix-timestamp
Deleting records before a certain date

How would I go about deleting all records from a MySQL table from before a certain date, where the date …

mysql datetime delete-row
MySQL InnoDB not releasing disk space after deleting data rows from table

I have one MySQL table using the InnoDB storage engine; it contains about 2M data rows. When I deleted data …

mysql innodb delete-row