troubleshooting Question

Incorrect syntax near the keyword 'KEY'.

Avatar of rgb192
rgb192Flag for United States of America asked on
Microsoft SQL Server 2005
8 Comments1 Solution4268 ViewsLast Modified:
CREATE TABLE uk_postcodes (
  postcode varchar(5) NOT NULL,
  x int(11) NOT NULL DEFAULT '0',
  y int(11) NOT NULL DEFAULT '0',
  latitude decimal(5,2) NOT NULL DEFAULT '0.00',
  longitude char(8) NOT NULL DEFAULT '0',
  town varchar(255) DEFAULT NULL,
  county varchar(255) DEFAULT NULL,
  PRIMARY KEY (postcode),
  KEY x (x,y)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='DanielGibbs.Net Free UK Postcode Database';

Msg 156, Level 15, State 1, Line 10
Incorrect syntax near the keyword 'KEY'.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros