#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Finland, Hanko
    Posts
    17
    Rep Power
    0
    Not related on php but:
    How do I write the Alter table clause on Mysql if I want to add on delete cascade on a table.
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    jarikark,

    The following is the "Alter table syntax".

    ALTER TABLE tablename ADD fieldname FIELDTYPE;

    eg:
    ALTER TABLE emp ADD ename VARCHAR(30);


    I don't know wether "on delete cascade" is supported by mysql or not.I haven't tried this with mysql.

    If you post this question in mysql forum,then you may get a better answer.Also check it out the mysql manual.




    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."

Similar Threads

  1. League table problem
    By silverduck in forum MySQL Help
    Replies: 8
    Last Post: February 10th, 2004, 12:38 PM
  2. Replies: 0
    Last Post: January 30th, 2004, 02:18 PM
  3. alter table
    By weebeng in forum Oracle Development
    Replies: 3
    Last Post: January 29th, 2004, 04:36 AM
  4. how to keep table on top, not centered??
    By vinyl in forum HTML Programming
    Replies: 2
    Last Post: January 20th, 2004, 06:19 PM
  5. syntax for updating table
    By adamsca in forum MySQL Help
    Replies: 1
    Last Post: December 17th, 2003, 03:58 PM

IMN logo majestic logo threadwatch logo seochat tools logo