What is wrong with this SQL statement

mysql, sql

Solution

I think it's because you are missing a value

You have 11 columns named and only 10 values

Problem

The error is: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RA---SIN', 'DEC--SIN', 0.0,-90.0)' at line 1 ``` INSERT INTO files_table (filename, folder, survey, telescope, author, observer, equinox, ctype1, ctype2, crval1, crval2) VALUES('H001_abcde_luther_chop.fits', 'C:\dev\data\FITS\surveys\', '', '','', -1.0, 'RA---SIN', 'DEC--SIN', 0.0,-90.0) ``` The statement that created the table was (the line breaks are just for ease of reading) ``` create table files_table (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, filename varchar(255), folder varchar(255), survey varchar(255), telescope varchar(255), author varchar(255), observer varchar(255), equinox double, ctype1 varchar(255), ctype2 varchar(255), crval1 double, crval2 double); ``` - Is it because I use ' instead of " - this hasn't troubled me before - Is it due to the -- in RA---SIN and DEC--SIN

Original source