MySQL INSERT INTO SELECT Sub-Query Example Selected Columns

MySQL INSERT INTO SELECT Sub-Query Example Selected Columns

Open your SQL Query Editor then copy & paste the below code to insert some Selected column(s) data from another table using INSERT INTO.. SELECT MySQL Sub-Query:

   INSERT INTO test( TestName )
   SELECT LastName
   FROM employees
   WHERE EmployeeID >101;

MySQL INSERT INTO SELECT Sub-Query Example Selected Columns - Execution in SQL Query Editor

 

Related Tutorial Examples

  1. MySQL Sample Database Script Like Oracle HR Schema
  2. MySQL Sub Query: INSERT INTO SELECT *... Example
  3. MySQL Sub Query: CREATE TABLE SELECT... Example
  4. MySQL Sub Query: CREATE TABLE SELECT *... Example
  5. MySQL TRUNCATE TABLE Example
  6. Parentheses In SQL Command MySQL Example
  7. Aliase Column Name In SQL Command MySQL Example
  8. Operator Precedence In SQL Command MySQL Example
  9. 19 Examples to Learn MySQL
  10. 28 Basic Tutorials to Learn Oracle

No comments:

Post a Comment

leave your comments here..