DISQUS

Code Spatter: Multiple Inserts with a Subquery

  • dubayou · 1 year ago
    this is beautiful.
    but damm, i can only think of the ga-zillions of scripts i need to rewrite
  • David Mathers · 1 year ago
    That isn't a subquery (you can remove the () around the select), it's mysql syntax:

    http://dev.mysql.com/doc/refman/5.0/en/insert-s...
  • Greg Allard · 1 year ago
    Yeah I guess the parenthesis weren't needed, but the result of one query (SELECT) is going to the other (INSERT) so I'd probably still call it a subquery.