|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
mysql error
what did i do wrong right near the end? thanks
Error SQL-query : CREATE TABLE `visit` ( `visit_number` INT NOT NULL AUTO_INCREMENT, `id` INT NOT NULL , `when` TIMESTAMP NOT NULL , `number_of_problems` TINYINT DEFAULT '1' NOT NULL , `weight` FLOAT, `height` FLOAT, `head_circ` FLOAT, `temp` FLOAT, `pulse` TINYINT UNSIGNED, `resp_rate` TINYINT UNSIGNED, `BPsystolic` TINYINT UNSIGNED NOT NULL , `BPdiastolic` TINYINT UNSIGNED, `school_note` VARCHAR, `other_notes` VARCHAR, PRIMARY KEY ( `visit_number` ) , INDEX ( `id` ) ) MySQL said: You have an error in your SQL syntax near ' `other_notes` VARCHAR, PRIMARY KEY (`visit_number`), INDEX (`id`))' at line 1 |
|
#2
|
||||
|
||||
|
I think you maybe need to give your index a name. Try changing your penultimate line to:
Code:
INDEX my_index_name ( `id` ) |
![]() |
| Viewing: Dev Articles Community Forums > Databases > MySQL Development > mysql error |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|