Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to create foreign key in SQL?
Message
De
19/01/2002 02:03:03
 
 
À
18/01/2002 08:25:55
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Divers
Thread ID:
00606630
Message ID:
00607209
Vues:
29
Chun,
Try this query.But i run it with access.you make change as your requirement.

Query:
CREATE TABLE groups_role
( groups_id text NOT NULL, gr_role text NOT NULL, gr_add bit NOT NULL, gr_edit bit NOT NULL, gr_delete bit NOT NULL, gr_read bit NOT NULL, PRIMARY KEY (groups_id, gr_role), FOREIGN KEY (groups_id) REFERENCES groups(gr_id));

you change text as varchar and create groups table separetly.ok.All the best.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform