1

Тема: проблема

подскажите пожалуйста, пытаюсь установить базу, запрос вида:

DROP TABLE IF EXISTS meteo;
CREATE TABLE meteo (
   id int(12) NOT NULL auto_increment,
   index int(11) NOT NULL,
   sname varchar(200) NOT NULL,
   latitude int(11) NOT NULL,
   longitude int(11) NOT NULL,
   day int(11) NOT NULL,
   month int(11) NOT NULL,
   year int(11) NOT NULL,
   hour int(11) NOT NULL,
   tod int(11) NOT NULL,
   weekday int(11) NOT NULL,
   predict int(11) NOT NULL,
   cloudiness int(11) NOT NULL,
   precipitation int(11) NOT NULL,
   rpower int(11) NOT NULL,
   spower int(11) NOT NULL,
   pressure_min int(11) NOT NULL,
   pressure_max int(11) NOT NULL,
   temperature_min int(11) NOT NULL,
   temperature_max int(11) NOT NULL,
   wind_min int(11) NOT NULL,
   wind_max int(11) NOT NULL,
   wind_direction int(11) NOT NULL,
   relwet_min int(11) NOT NULL,
   relwet_max int(11) NOT NULL,
   heat_min int(11) NOT NULL,
   heat_max int(11) NOT NULL,
   PRIMARY KEY (id)
);

выдает ошибку:

#1064 - 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 'int(11) NOT NULL,
   sname varchar(200) NOT NULL,
   latitude int(11) NOT NULL' at line 3

как исправить запрос, помогите плииз....

2

Re: проблема

akcium
Надо забрать имя столбца `index` в косые кавычки, так как это зарезервированное слово.