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; Quote 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. Quote 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? Quote 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. 1 Quote 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.