#1
  1. No Profile Picture
    chinnavi
    Guest
    Devshed Newbie (0 - 499 posts)
    Im using PERL DBI ..
    i have on field in my table "HV" called

    --->
    id integer(11) PRIMARY KEY AUTO_INCREMENT ,
    name varchar(25)
    --->

    Now i wanna insert values into table ...

    what is the SQL statement i have to use for
    inserting values ..

    --->
    INSERT INTO HV values ( ????? ,"name");
    --->
    im using MySQL 3.22.27...

    thanks in advance

    vijay

  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15

    id integer(11) PRIMARY KEY AUTO_INCREMENT ,
    name varchar(25)
    --->


    you can use a create statement like following for auto_increment field.

    create table tablename(id int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,name varchar(25));


    --->
    INSERT INTO HV values ( ????? ,"name");
    --->

    In insert statement you can't add values to an auto increment field.just you can skip that field.it will automatically insert that number.

    INSERT INTO HV(name)values("name");




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

    "The fear of the LORD is the beginning of knowledge..."
  4. #3
  5. No Profile Picture
    chinnavi
    Guest
    Devshed Newbie (0 - 499 posts)

    Thank you very much ...
    it is working well and fine ...


    vijay
  6. #4
  7. No Profile Picture
    chinnavi
    Guest
    Devshed Newbie (0 - 499 posts)

    Thank you very much ...
    it is working well and fine ...


    vijay

Similar Threads

  1. Is there an Apache 2.0 SSL howto?
    By 2marshall8 in forum Apache Development
    Replies: 1
    Last Post: May 19th, 2004, 08:30 PM
  2. howto do global attachment files
    By melinda in forum Visual Basic Programming
    Replies: 18
    Last Post: November 27th, 2003, 05:27 PM
  3. howTo uninstall unneeded m$ drivers
    By disorder in forum Windows Help
    Replies: 0
    Last Post: May 5th, 2003, 09:25 PM
  4. Howto access the absolute position of an element?
    By ds99jove in forum HTML Programming
    Replies: 6
    Last Post: July 29th, 2002, 04:16 PM
  5. RDIST howto
    By Viral in forum PHP Development
    Replies: 1
    Last Post: November 15th, 2001, 11:10 AM

IMN logo majestic logo threadwatch logo seochat tools logo