Jan Walraven
DevOps



Categories:
  • Arduino (2)
  • CSS (3)
  • Docker (10)
  • ESXi (1)
  • Git (4)
  • Javascript (6)
  • Linux (31)
  • Mac (6)
  • Magento (4)
  • Mysql (13)
  • PHP (9)
  • Zend framework 2 (9)
  • Posted on February 22, 2012

    Example intro

    Copy data from tb1 to tb2

    
    INSERT INTO tb2 SELECT * FROM tb1
    

    Copy specific columns from tb1 to tb2

    
    INSERT INTO tb2 (col1,col2) SELECT col11,col12 FROM tb1
    

    Copy specific columns from tb1 to tb2 with WHERE statement

    
    INSERT INTO tb2 (col1,col2) SELECT col11,col12 FROM tb1 WHERE col11 > 1