If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Cascade Delete And Update

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-23-05, 01:58
popskie popskie is offline
Registered User
 
Join Date: Oct 2004
Location: In cousin's house
Posts: 303
Cascade Delete And Update

HI,
Im a mysql newbie, my problem is sounds easy to all mysql experts. I used mysql 5.0.1 beta. It is posible to to have a cascade delete and update here.
ok i have to give 2 tables here.
Code:
table1
idno  desc
0001  juan
0002  Rey

Table2 
idno  Type
0001  AAA
0001  BBB
0002  AAA
0002 CCC
if i delete idno 0001 in table1 . The corresponding record in table2 also where delete.
In Ms SQL it is posible.

Another question is, what is the diferent between unique and primary index?


Popskie

Popkie
Reply With Quote
  #2 (permalink)  
Old 09-23-05, 08:06
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,534
yes, you can have CASCADE, but you must use InnoDB tables for this

the difference between unique and primary keys is that unique keys can be null
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 09-23-05, 21:00
popskie popskie is offline
Registered User
 
Join Date: Oct 2004
Location: In cousin's house
Posts: 303
thanks for the answer bro.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On