Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to create foreign key in SQL?
Message
From
19/01/2002 02:03:03
 
 
To
18/01/2002 08:25:55
General information
Forum:
Microsoft SQL Server
Category:
Database design
Miscellaneous
Thread ID:
00606630
Message ID:
00607209
Views:
28
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform