Paul Oluyege
Paul Oluyege

Reputation: 26

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '),

CREATE TABLE `NavigateNija`.`FUTA`(
  `Id` INT(255) NOT NULL AUTO_INCREMENT,
  `_RoadSideArea` CHAR(255)NOT NULL,
  `_Img` BLOB,
  `_Tamt` DOUBLE(10),
  `_MofT` CHAR(50),
  PRIMARY KEY(`Id`)
) ENGINE = InnoDB

MySQL said:

Documentation #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '), `_MofT` CHAR(50), PRIMARY KEY(`Id`) ) ENGINE = InnoDB' at line 5

Upvotes: 1

Views: 5151

Answers (1)

Drew
Drew

Reputation: 24949

Ditch the DOUBLE(10) and go with DOUBLE:

 CREATE TABLE `FUTA`(
  `Id` INT(255) NOT NULL AUTO_INCREMENT,
  `_RoadSideArea` CHAR(255)NOT NULL,
  `_Img` BLOB,
  `_Tamt` DOUBLE,
  `_MofT` CHAR(50),
  PRIMARY KEY(`Id`)
) ENGINE = InnoDB;

The DOUBLE datatype accepts either no parameters or two parameters (the number of digits allowed to be stored in the number and the number of digits allowed after the decimal point). Reference

Upvotes: 1

Related Questions