Welcome, Guest
  • Author Topic: HOW TO ALTER....  (Read 1411 times)

    Asim

    • Senior Programmer
    • ****
    • Posts: 338
      • MSN Messenger - asimsiddiqui01@hotmail.com
      • Yahoo Instant Messenger - asimsidd2001@yahoo.com
      • View Profile
      • -------------
      • Email
    HOW TO ALTER....
    « on: 06/12/02, 07:31 »

    HI THERE,
    I'VE MADE AN DATABASE....
    BUT I'VE MADE SOME MINER MISTAKES IN IT...
    NOW I WANT IT TO REPLACE THEM WITH THEIR CORRECT SPELLINGS....
    IS IT POSSIBLE TO ALTER THOSE SPELLINGS IN THE MYSQL...

    REGARDS,
    ASIM SIDDIQUI...
    ..::Asim Siddiqui::..

    rich

    • Server what's that
    • *
    • Posts: 17
      • View Profile
      • Email
    Re:HOW TO ALTER....
    « Reply #1 on: 06/29/02, 17:40 »
    here are some commands that might help as you have not exactly been specific as to what properties you want to alter

    altering table definitions:-

    how to add a new column to a table

    sql> alter table employees add  (hire_date date);

    Modifying column datatype

    sql> alter table products modify (lastname varchar2(25));

    Dropping columns

    sql> alter table employee drop column salary;

    Dropping tables

    sql> drop table emp_copy_3;

    Trunc tables

    sql> truncate table tester;

    Renaming tables

    sql> rename tester to tester2;

    or

    sql> alter table tester3 rename to tester;


    I hope some of these commands help anyone.

    Richb
    « Last Edit: 06/29/02, 17:40 by rich »

    Asim

    • Senior Programmer
    • ****
    • Posts: 338
      • MSN Messenger - asimsiddiqui01@hotmail.com
      • Yahoo Instant Messenger - asimsidd2001@yahoo.com
      • View Profile
      • -------------
      • Email
    Re:HOW TO ALTER....
    « Reply #2 on: 06/30/02, 06:06 »

    THANKS RICHARD....
    IT WAS SO HELPING FOR ME....
    DEFINATELY...

    REGARDS,
    ASIM SIDDIQUI...
    ..::Asim Siddiqui::..