lime icon

Phosphorus and Lime

A Developer's Broadsheet

This blog has been deprecated. Please visit my new blog at klenwell.com/press.
MySQL: Generic Create Table
A template for creating a MyISAM table in MySQL:

DROP TABLE IF EXISTS `GENERIC`;
CREATE TABLE IF NOT EXISTS `GENERIC`
(
`ID` int(11) NOT NULL auto_increment,
`varchar` varchar(40) NOT NULL default '',
`int` int(11) NOT NULL default '0',
`tiny_int` tinyint(4) NOT NULL default '0',
`text` text,
`datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`timestamp` int(11) NOT NULL default '0',
PRIMARY KEY (`ID`)
)
TYPE=MyISAM
AUTO_INCREMENT=1 ;


see also: MySQL Reference Manual