Xnote.com Technical Forums Last active: Never
Not logged in [Login - Register]
Go To Bottom

Printable Version | Subscribe | Add to Favourites  
Author: Subject: Create Foreign Key
Alan Fullmer
Super Administrator
*********




Posts: 62
Registered: 8-12-2004
Member Is Offline

Mood: No Mood

[*] posted on 10-2-2010 at 12:07 PM
Create Foreign Key



create index [index name] on [table name] ([field name]);


alter table [table name]
add constraint [constraint name]
foreign key ([field name])
references [foreign table name] ([foreign field name])

--
optionally you can add to the end:

on delete cascade
on delete set null




View User's Profile Visit User's Homepage View All Posts By User U2U Member


Go To Top


Powered by XMB
Developed By Aventure Media & The XMB Group © 2002-2007