i have line in sql table:
income number(12,2), and want recreate table in mysql, it's throwing me error:
error 1064 (42000): have error in sql syntax; check manual use near '2))' @ line 4
this how i'm creating table:
create table doctors( doctorid integer(5) primary key, doctorname varchar(20), income integer(12,2)); how can in mysql?
*i have been able replicate table in sqlite without errors.
if trying question title states (i.e. store 2 integer values same column), may looking use array. databases postgresql support arrays (see postgresql array documentation), mysql doesn't natively (see mysql documentation). however, mysql documentation suggests using language extension serialise/deserialise data (see php example).
otherwise, may looking decimal type:
income decimal(12,2)
Comments
Post a Comment