Decimal data type

I have a table

   rack_id INT NOT NULL,
   beginning_slot DECIMAL(2,1) NOT NULL,
   ending_slot DECIMAL(2,1) NOT NULL,
   device VARCHAR(100) NOT NULL,
   device_width INT DEFAULT '150',
   beginning_x INT DEFAULT '25',
   ending_x INT DEFAULT '150',
   FOREIGN KEY ( rack_id ) REFERENCES racks ( rack_id) ,
   PRIMARY KEY ( panel_id )

I try & input a bunch of data and

am I using the decimal type correctly?

In your query there should be a comma between device and device-width.

1 Like

and in general; the database engine is pointing you to the problem.

"near ‘device_width, …’ " generally (like most programming languages) implies “The first word of this string. Something went wrong there. Check there and the word immediately before it to see what went wrong.”

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.