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

    Join Date
    Apr 2002
    Posts
    6
    Rep Power
    0

    Inserting values from table A to B


    Hi, i have a problem with mysql, and i really appreciate any help at all.

    i'm trying to perform the following insertion.

    insert B(1,2,3) values ('x,'y','z');

    the problem with it is, the value y inserted must be the same with the value of y1 from table A, y1 changes frequently.
    is there any way i can do it without going into A and looking at the value of y1 each time ?
  2. #2
  3. Wiking
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Sep 2000
    Location
    Sweden
    Posts
    3,608
    Rep Power
    30
    You can do an INSERT INTO B (x, y, z) SELECT x, y, z FROM A WHERE this=that, if that's what you're looking for...

    //NoXcuz
    UN*X is sexy!
    who | grep -i blonde | date; cd ~; unzip; touch; strip; finger; mount; gasp; yes; uptime; umount; sleep
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2002
    Posts
    6
    Rep Power
    0

    Talking Thanks !!


    t'll do just fine in my c++ proggy...

    Thanks a lot !!

    pS: is there something wrong with this forum ?most of the time i press the submit button, it'll ask me to log in again, and erased my reply.....
    or maybe it's just not my day.
    Just to post this reply, it took me like 5 logins ?
    hope i won't need the 6th

    6th... login.. i copied the msg so i don't need to retype all over again... anyone else getting this ? here goes nothing...

IMN logo majestic logo threadwatch logo seochat tools logo