juretta.com

MySQL Cheat Sheet

June 24, 2005
Tags: Database MySQL
mysql> SHOW Table Status;
mysql> SHOW INDEX FROM table;
mysql> SELECT @var := MAX(irgendwas) FROM table;
mysql> EXPLAIN SELECT ....
mysql> SHOW FIELDS FROM table;
Multiple Update Syntax
mysql>UPDATE boutique_locator_shops AS bl,
boutiques AS b SET bl.time_open_1 = b.Open1,
bl.time_open_2 = b.Open2,
bl.time_open_3 = b.Open3 WHERE b.Country = bl.country AND b.City = bl.city AND b.Fax = bl.fax
UTF-8
mysql>SET names utf8;
Empty table
mysql>TRUNCATE TABLE tbl_name
reset auto_increment
mysql>ALTER TABLE tbl_name AUTO_INCREMENT = 0

blog comments powered by Disqus

About

juretta.com is the personal workspace of Stefan Saasen. More about this site can be found in the „About“ section.

Share!

Latest links  RSS  

More...