MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old October 4th, 2003, 09:30 PM
jditrag jditrag is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: portsmouth ohio
Posts: 1 jditrag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #2  
Old October 5th, 2003, 07:43 PM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
I think you maybe need to give your index a name. Try changing your penultimate line to:

Code:
INDEX my_index_name ( `id` ) 

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > mysql error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT