ttkalec1
Member
- Joined
- Feb 26, 2005
- Messages
- 19
Hi,
I dont understand how relationships and constraints in a database work...
Actually, I just wanna know if this is possible:
I have two tables: 1. contains a primary key, and the 2. contains foreign key that is linked to the first one.
It looks like this:
1.table
ID Name Year
2.table
ID Description
Is it possible to delete a record in first table (which contains primary key), and then, because of their relationship, rows in the second table containing ID (foreign key) be deleted?
Or do I need to do it all programatically
Btw. Im using Microsoft SQL Server 2005 Express
I dont understand how relationships and constraints in a database work...
Actually, I just wanna know if this is possible:
I have two tables: 1. contains a primary key, and the 2. contains foreign key that is linked to the first one.
It looks like this:
1.table
ID Name Year
2.table
ID Description
Is it possible to delete a record in first table (which contains primary key), and then, because of their relationship, rows in the second table containing ID (foreign key) be deleted?
Or do I need to do it all programatically
Btw. Im using Microsoft SQL Server 2005 Express