Friday, December 9, 2011

Obtain create and last update time of MySQL table

This query brings you create and last update among other useful information.

SELECT *
FROM information_schema.tables
WHERE TABLE_SCHEMA = 'databasename'
AND TABLE_NAME = 'tablename' ;

Tuesday, August 9, 2011

MySQL query logic

SELECT case
when c.boarding_number is not NULL then 'YES'
else 'NO'
end ;
It's syntactically correct.