71 thoughts on “inserting data from one mysql table into another mysql table

  • May 30, 2014 at 4:03 am
    Permalink

    I have two table consist of same field names except one field as below:

    table 1

    id_student, studentname, studentnric, studentno, dateofbirth, address, phone, courses, session
    table 2

    id_graduate, studentname, studentnric, studentno, courses, session
    What I am trying to accomplish is, to get the data in the first table into the second table

    Ans;

    INSERT INTO table2
    SELECT id_student as id_graduate, studentname, studentnric, studentno, courses, session
    FROM table1

  • May 30, 2014 at 4:03 am
    Permalink

    The SQL SELECT INTO Statement
    The SELECT INTO statement selects data from one table and inserts it into a new table.

    SQL SELECT INTO Syntax

    We can copy all columns into the new table:

    SELECT *
    INTO newtable [IN externaldb]
    FROM table1;
    Or we can copy only the columns we want into the new table:

    SELECT column_name(s)
    INTO newtable [IN externaldb]
    FROM table1;

  • May 30, 2014 at 4:04 am
    Permalink

    SELECT *
    INTO CustomersBackup2013
    FROM Customers;
    Use the IN clause to copy the table into another database:

    SELECT *
    INTO CustomersBackup2013 IN ‘Backup.mdb’
    FROM Customers;
    Copy only a few columns into the new table:

    SELECT CustomerName, ContactName
    INTO CustomersBackup2013
    FROM Customers;
    Copy only the German customers into the new table:

    SELECT *
    INTO CustomersBackup2013
    FROM Customers
    WHERE Country=’Germany’;
    Copy data from more than one table into the new table:

    SELECT Customers.CustomerName, Orders.OrderID
    INTO CustomersOrderBackup2013
    FROM Customers
    LEFT JOIN Orders
    ON Customers.CustomerID=Orders.CustomerID;

  • February 9, 2015 at 8:14 pm
    Permalink

    I’m impressed, I must say. Seldom do I encounter a
    blog that’s equally educative and amusing, and without a doubt, you’ve hit the nail on the head.

    The problem is an issue that not enough people are speaking intelligently about.
    Now i’m very happy I found this in my search for something concerning this.

  • February 9, 2015 at 8:29 pm
    Permalink

    It’s the best time to make some plans for the future and it is time
    to be happy. I’ve read this post and if I could I desire to suggest you some interesting things or suggestions.
    Perhaps you could write next articles referring to this article.
    I want to read more things about it!

  • February 9, 2015 at 9:20 pm
    Permalink

    Thanks for a marvelous posting! I quite enjoyed reading it, you will be a great
    author.I will remember to bookmark your blog and may come back very soon. I want to encourage you to ultimately continue
    your great job, have a nice weekend!

  • February 9, 2015 at 9:47 pm
    Permalink

    Hi, I do think this is an excellent website. I stumbledupon it 😉 I may come back yet again since I saved as a favorite it.
    Money and freedom is the greatest way to change, may you be rich and continue to guide
    others.

  • February 9, 2015 at 10:42 pm
    Permalink

    Right here is the perfect blog for everyone who hopes to understand this topic.
    You know so much its almost hard to argue with you (not that I
    really would want to…HaHa). You definitely put a fresh spin on a subject
    that has been discussed for years. Excellent stuff, just excellent!

  • February 9, 2015 at 10:49 pm
    Permalink

    hi!,I like your writing very a lot! percentage we keep in touch extra approximately your article on AOL?
    I require a specialist on this space to resolve my problem.
    Maybe that’s you! Looking ahead to look you.

  • February 10, 2015 at 3:17 am
    Permalink

    Howdy, i read your blog occasionally and i own a similar one and i
    was just curious if you get a lot of spam comments?
    If so how do you protect against it, any plugin or
    anything you can recommend? I get so much lately it’s
    driving me insane so any assistance is very much appreciated.

  • February 10, 2015 at 5:01 am
    Permalink

    With havin so much written content do you ever run into any issues
    of plagorism or copyright violation? My website has a
    lot of exclusive content I’ve either created myself or outsourced but it appears a lot of it is popping it up all over the web without my
    permission. Do you know any ways to help stop content from being stolen? I’d genuinely appreciate it.

  • February 10, 2015 at 5:47 am
    Permalink

    Hi, i read your blog occasionally and i own a similar one and i was just
    curious if you get a lot of spam comments? If so how do you prevent it, any plugin or anything you can recommend?
    I get so much lately it’s driving me crazy so any support is very much appreciated.

  • February 10, 2015 at 7:07 am
    Permalink

    Its like you read my thoughts! You appear to understand a lot approximately this, such as you wrote the guide in it or something.
    I feel that you simply can do with some p.c. to pressure
    the message home a little bit, but instead of that, that is great blog.
    A fantastic read. I’ll definitely be back.

  • February 10, 2015 at 7:41 am
    Permalink

    Thanks for the marvelous posting! I seriously enjoyed reading it,
    you could be a great author.I will always bookmark your blog and will eventually come back down the road.

    I want to encourage you continue your great posts, have a nice morning!

  • February 10, 2015 at 7:44 am
    Permalink

    Attractive component of content. I simply stumbled
    upon your weblog and in accession capital to say that I get actually enjoyed account your
    blog posts. Anyway I’ll be subscribing on your feeds and even I success
    you get entry to consistently rapidly.

  • February 10, 2015 at 7:47 am
    Permalink

    Hey I know this is off topic but I was wondering if you
    knew of any widgets I could add to my blog that automatically
    tweet my newest twitter updates. I’ve been looking
    for a plug-in like this for quite some time and was hoping maybe you
    would have some experience with something like this.
    Please let me know if you run into anything.
    I truly enjoy reading your blog and I look forward to your new updates.

  • February 10, 2015 at 10:59 am
    Permalink

    Hello! I know this is kind of off-topic but I had to ask.

    Does building a well-established website like yours take a
    lot of work? I am completely new to writing a blog
    but I do write in my journal daily. I’d like to start a blog so I can share my experience and thoughts online.
    Please let me know if you have any recommendations or tips for
    brand new aspiring blog owners. Appreciate it!

  • February 10, 2015 at 12:39 pm
    Permalink

    We’re a group of volunteers and opening a new scheme in our community.
    Your site provided us with valuable information to work
    on. You have done an impressive job and our whole community will be thankful to you.

  • February 10, 2015 at 12:56 pm
    Permalink

    Have you ever thought about adding a little bit more than just your articles?
    I mean, what you say is important and everything.
    However just imagine if you added some great visuals or video
    clips to give your posts more, “pop”! Your content is excellent but
    with pics and video clips, this site could undeniably be one of
    the greatest in its field. Fantastic blog!

  • February 10, 2015 at 2:41 pm
    Permalink

    I like the helpful information you provide in your articles.

    I will bookmark your weblog and check again here frequently.
    I’m quite sure I’ll learn many new stuff right here!
    Best of luck for the next!

  • February 10, 2015 at 3:08 pm
    Permalink

    Hi there, just became aware of your blog through Google,
    and found that it is truly informative. I am going to watch out for brussels.
    I’ll appreciate if you continue this in future.
    Lots of people will be benefited from your writing. Cheers!

  • February 10, 2015 at 7:53 pm
    Permalink

    I’m not sure where you’re getting your information, but great topic.
    I needs to spend some time learning more or understanding
    more. Thanks for excellent info I was looking for this info for my mission.

  • February 10, 2015 at 10:27 pm
    Permalink

    I truly love your website.. Excellent colors & theme.
    Did you create this web site yourself? Please reply back as
    I’m attempting to create my own personal site and would like to find out where you got this from or what the
    theme is named. Cheers!

  • February 10, 2015 at 11:04 pm
    Permalink

    Whats up are using WordPress for your blog platform?
    I’m new to the blog world but I’m trying to get started and
    create my own. Do you require any html coding expertise to make your own blog?

    Any help would be greatly appreciated!

  • February 11, 2015 at 12:17 am
    Permalink

    Hello There. I discovered your blog the usage of msn. That is an extremely well
    written article. I’ll make sure to bookmark it and return to learn extra of your
    useful information. Thanks for the post. I’ll definitely comeback.

  • February 11, 2015 at 12:28 pm
    Permalink

    My brother recommended I might like this blog.
    He was totally right. This post actually made my day.
    You can not imagine just how much time I had spent for this info!

    Thanks!

  • February 15, 2015 at 3:53 pm
    Permalink

    That includes moving a patient from one facility to another, to give them a better chance of survival or
    an increased level of treatment. Your sensual session starts at the minute the Leeds
    escort girls arrive. Escort services in Toronto are one of the most spoken and hottest services.

  • February 15, 2015 at 8:27 pm
    Permalink

    If you have no idea where to begin, don’t try it on your own. but the person on the phone, who claims they are in the
    U. It means you can study well OR you know a lot about computers.

  • February 17, 2015 at 3:01 pm
    Permalink

    Appearing with her on the show was the actor
    mentioned above. Check out the website of the Birmingham escort agency.
    For this, you need to ask your friends who have already availed
    the service of the agency or you can also read
    out the blog section of the site to get a better review.

  • February 17, 2015 at 4:47 pm
    Permalink

    I was recommended this website by my cousin. I am not sure whether this post is written bby him as nobody else know
    such detailed about my problem. You’re amazing! Thanks!

  • February 22, 2015 at 9:44 am
    Permalink

    I’m extremely impressed with your writing skills as well as with the layout on your weblog.
    Is this a paid theme or did you modify it yourself?
    Either way keep up the excellent quality writing, it’s rare to see
    a great blog like this one nowadays.

  • February 25, 2015 at 2:38 pm
    Permalink

    Undeniably imagine that that you said. Your favourite justification seemed to be at the web the easiest thing to keep in mind of.
    I say to you, I certainly get annoyed whilst folks consider worries that they plainly don’t know about.
    You controlled to hit the nail upon the top and
    also defined out the whole thing with no need side-effects , people can take a signal.
    Will likely be back to get more. Thanks

  • March 3, 2015 at 3:06 pm
    Permalink

    Incredible! This blog looks exactly like my old one!

    It’s on a totally different subject but it has pretty much the same page
    layout and design. Superb choice of colors!

  • March 15, 2015 at 4:42 pm
    Permalink

    It’s onnly a fantastic product or service particularly for men, who want too learn to fljrt or enrich it.

    Magnetic Messaging, it must be stated, doesn’t have only oone miracle text which can persuade the lady nowadays; evn so the solutions inside of the
    guide have already bbeen shown to wwork and in addition have achievd optimistic outcomes a lot
    of males around the globe.

  • March 17, 2015 at 2:19 pm
    Permalink

    It can be only a excellent products especially forr males, who wish
    tto find out to flirt or increasse it. Magnetuc Messaging, it ought to be stated, doesn’t have only one miracle text that will
    convince the lady nowadays; nonetheless thee appraches inside of the book are actually proven to do
    the job as well as have achieved optimistic benecits a lot off males across the globe.

  • March 19, 2015 at 12:32 pm
    Permalink

    Now, however, this super easy technique will produce the number for you in no time flat.
    Right-click in the right-hand pane, choose New ->
    DWORD Value. If you’d like your bot to fireplace
    with a specific player automatically you’ll need
    the battlefield 3 aimbot by which you can make use of the bots you have to help
    you on the game.

  • Pingback: Google

Leave a Reply