Top "Mysql" questions

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

Calculate difference between two datetimes in MySQL

I am storing the last login time in MySQL in, datetime-type filed. When users logs in, I want to get …

mysql
Update a column in MySQL

I have a table table1 with three columns and a bunch of rows: [key_col|col_a|col_b] I …

mysql insert-update
MySQL "Group By" and "Order By"

I want to be able to select a bunch of rows from a table of e-mails and group them by …

mysql sql group-by sql-order-by aggregate-functions
MySQL Cannot drop index needed in a foreign key constraint

I need to ALTER my existing database to add a column. Consequently I also want to update the UNIQUE field …

mysql
Difference between float and decimal data type

What difference does it make when I use float and decimal data types in MySQL?. When should I use which?

mysql
MySQL - UPDATE query with LIMIT

I want to update rows in my table with starting from 1001 to next 1000. I tried with following query: UPDATE `oltp_…

mysql limit sql-update
MySQL: Fastest way to count number of rows

Which way to count a number of rows should be faster in MySQL? This: SELECT COUNT(*) FROM ... WHERE ... Or, the …

mysql performance
MySQL INNER JOIN select only one row from second table

I have a users table and a payments table, for each user, those of which have payments, may have multiple …

mysql sql select inner-join
Difference Between Schema / Database in MySQL

Is there a difference between a schema and a database in MySQL? In SQL Server, a database is a higher …

mysql database schema database-schema
LEFT JOIN only first row

I read many threads about getting only the first row of a left join, but, for some reason, this does …

mysql join left-join groupwise-maximum