Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help w/ making indexes and relationship in a table?

Status
Not open for further replies.

khiemadong

Technical User
Apr 26, 2003
6
US
below is a problem that i do get so confused. i need to use the sql command in the query analyser for that. If anyone can show me the way to do it, i would really appreciate that.

i was given a table that has the name of the table, the constrain column, and field column and the type. my question is what i should do w/ a constrain. for example:

System_Software_Relationship_T
Constraint Name Field(s) Type
PK_System Software_Id Primary Key, Clustered
FK_System Software_IN Foreign Key to
Software_T.Software_ID, Cascade Delete
FK_System_ System_Assignment_IN Foreign Key
to System_Assignment_T.
System_Assignment_ID

what should i write the sql line for this one?
Thank you very much

 
Code:
create table System_Software_Relationship_T
(software_id int constraint PK_System primary key,
software_in int constraint fk_system references 
Software_T(Software_ID) on delete cascade,
system_assignment_in int constraint fk_system_ references 
system_assignment_T(System_assignment))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top