Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with Alter Table syntax
Message
De
02/12/2004 15:12:27
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Help with Alter Table syntax
Divers
Thread ID:
00966491
Message ID:
00966491
Vues:
45
Hi, All

I am trying to put a primary key into a table. Later I will be trying to set up relationships between the tables. For now I just want the primary keys in the tables. I have a hard time reading the help file on Alter Table.
I am using SPT from VFP 6 SP5. And the data is checked at the main database before my program even trys to put it into SQL Server 2000.
lcTableName = the name of the table in the database
studnt_id_ is a actual field in the table.

Here is the code that I am doing now:
   lcInsertStr = [ALTER TABLE ] + lcTableName + [ ALTER COLUMN studnt_id_ PRIMARY KEY]
The error I get is incorrect syntax near 'PRIMARY'.

Thanks in Advance
Beth
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform