Results 1 to 2 of 2
  1. #1
    Join Date
    May 2006
    Posts
    6

    Unanswered: mysql temp table two rows to one row

    Hi,

    I have temp table, made using mysql. Row are like this:

    domain, price, type
    .com, 8.99, registration
    .com, 9.99, renewal

    and so on

    I want to make it like this:

    domain, registration, renewal
    .com, 8.99, 9.99

    Anyone can help?
    Note: table is a temp table, not actual db table.

    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I created a SQL Fiddle at http://sqlfiddle.com/#!9/963567/1 that demonstrates one possible solution.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •