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

    Join Date
    Nov 2000
    Posts
    4
    Rep Power
    0
    hello !

    i have a problem on p. key
    i want to change the primary key from one field to another field .

    need help .........!!


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

    Join Date
    Sep 2000
    Posts
    12
    Rep Power
    0
    alter table [tablename] drop primary key;
    alter table [tablename] add primary key [field];
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2000
    Posts
    4
    Rep Power
    0
    Thanks !! It works a lot !!


    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by billylau:
    alter table [tablename] drop primary key;
    alter table [tablename] add primary key [field];
    [/quote]

Similar Threads

  1. autonumber primary key
    By densma in forum MS SQL Development
    Replies: 7
    Last Post: March 8th, 2005, 01:46 PM
  2. Having a really weird problem with forms and the Enter key
    By chapsymphony in forum HTML Programming
    Replies: 1
    Last Post: February 17th, 2004, 08:55 AM
  3. primary key
    By durilai in forum MySQL Help
    Replies: 1
    Last Post: February 6th, 2004, 03:16 PM
  4. retreiving primary key on nxt page
    By baz0hara in forum ASP Programming
    Replies: 2
    Last Post: January 21st, 2004, 06:42 AM
  5. show primary key
    By weebeng in forum Oracle Development
    Replies: 2
    Last Post: January 19th, 2004, 09:08 AM

IMN logo majestic logo threadwatch logo seochat tools logo