I am trying to put tax rates like 7.25, 8.5, 7.875, etc. into a table column, but they keep rounding to a whole number. Apparently, I am missing some kind of attribute designation?
Here's what I've got thus far:
CREATE TABLE stw_city (
ID int not null auto_increment primary key,
cityname varchar(30) not null,
taxrate int(7) not null
--CITYID int not null
);
Here's a test data population:
INSERT INTO stw_city (ID, cityname, taxrate) VALUES
(1,'city1',7.75),
(2,'city2',8.5);
The tax rate which shows for both is 8.
Can anyone shed some light on what I'm missing???
BTW, I chose int(7) in the event of future use for rates like: .078255 instead of 7.8255 (etc., etc.)
Thank you very much.