Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2004
    Location
    In cousin's house
    Posts
    303

    Unanswered: 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

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    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
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Oct 2004
    Location
    In cousin's house
    Posts
    303
    thanks for the answer bro.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •