I am trying to insert an entry into a table, using Java, and it returns me an error "Unknown column XX in 'field list'".
For example: I have created a table using this line:
CREATE TABLE `dbcs`.`born in` (`person` VARCHAR(100) ,`year` INT ,`prob` FLOAT);
the table was created successfully.
when I try to insert something to the table, it shows me the error. for example, the command:
INSERT INTO `dbcs`.`born in` VALUES (`Alanis Morissette`,1974,1.0)
will generate the error:
Unknown column 'Alanis Morissette' in 'field list'
Strings must be wrapped in quotes. You're using ticks which are not correct.
INSERT INTO `dbcs`.`born in` VALUES ('Alanis Morissette',1974,1.0)
use
INSERT INTO dbcs.born in VALUES ('Alanis Morissette',1974,1.0)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With