otuatail Posted December 20, 2017 Share Posted December 20, 2017 Sorry but can't get this table creation to work. Any help? DROP TABLE IF EXISTS `config`; CREATE TABLE IF NOT EXISTS `config` ( `EntryDate` date DEFAULT NULL, `BalanceValue` decimal(6,2) NOT NULL DEFAULT '0.00', `Mode` unsigned tinyint NOT NULL DEFAULT 0 ) ENGINE=MyISAM DEFAULT CHARSET=latin1; Link to comment Share on other sites More sharing options...
requinix Posted December 20, 2017 Share Posted December 20, 2017 Keyword order matters. Try the other way around. Link to comment Share on other sites More sharing options...
otuatail Posted December 20, 2017 Author Share Posted December 20, 2017 Thanks that works but when I inspect table I have tinyint(3) Why 3? Link to comment Share on other sites More sharing options...
requinix Posted December 20, 2017 Share Posted December 20, 2017 3 is the "width" of the numbers supported. Since a TINYINT UNSIGNED supports 0-255 that's three digits by default. The width doesn't really matter and doesn't limit what you can store. Link to comment Share on other sites More sharing options...
otuatail Posted December 20, 2017 Author Share Posted December 20, 2017 Thanks for your help. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.