Hi - I'm a mysql newbie. As I've yet to discover a method of batching mysql commands I prefer to input lengthy instructions (such as large file structures) in stages, so input errors can be dealt with more easily. For example, I first define table structures and then indexes.
This led me to use "create index" for the latter. The following syntax "create index city_idx on city_country_masterfile (city);" worked for an ordinary index definition. However, when I wanted to define the fourth column (pkey) as a primary key I could not get create index to work - I misunderstood the syntax or was misapplying "create index". What finally worked for me was "alter table city_country_masterfile add primary key (pkey);". The two purposes to this entry are 1) to inform those who may have similar problems, of my fix and 2) to ask others for some specific examples of "create index" and "create table" syntax, for example, for creating primary, unique and foreign keys, Hope this helps those and that others can too. Thank you and regards, John Barrington Please note new e-mail address: [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php