Control Flow in SQL

SELECT name AS Name, category AS Category,
IF(winter>500, "Sells", "Slow")
AS Trend FROM sales;

http://www.roseindia.net/mysql/mysql5/flow-control-constructs.shtml
Rename tables

RENAME TABLE table1 TO table2;

Add a user

connect mysql
INSERT INTO user VALUES(’%’,’monty’,PASSWORD(’some_pass’);
FLUSH PRIVILEGES;

Monitoring
The number of mysql processes running at any given time should be monitored. I do [...]

Continue reading " SQL Tips for MySQL "