Hi all,
Sorry to be a real pain in the A*SE today. I'm really cracking on with my
VFP -> SQLExpress -> SQLMobile -> PDA Application project now that I can
see/manipulate the data in SQLExpress, however I've come across a small
problem that has foxed me for a couple of hours.

I need to add a Primary key based on a field in the table called Primary_key
to a SQLExpress table and I can't find out the syntax to do it. Note that
the table is initially created without any primary key for a good reason and
I just want to allocate a primary key after creation.

In MySQL I would simply do:
ALTER TABLE Customer ADD PRIMARY KEY (Primary_Key)

I've tried :
1. Alter table Customer add constraint Primary key (primary_key) 
and
2. Alter table Customer alter Primary_Key primary key

Which the M$ help implies should work - but neither do.

Anyone any ideas?
 
Dave Crozier
 The secret to staying young is to live honestly, eat slowly, and to lie
about your age 

 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.2/393 - Release Date: 19/07/2006
 




_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to