MySQL INSERT INTO SELECT Sub Query Example

MySQL INSERT INTO SELECT Sub-Query Example

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

   INSERT INTO test
   SELECT EmployeeID, LastName
   FROM employees
   WHERE EmployeeID > 10

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

 

Related Tutorial Examples

  1. Arithmetic Operators In SQL Command MySQL Example
  2. Describe Table Structure MySQL Example
  3. SELECT Specific Columns MySQL Example
  4. SELECT Distinct... SQL Command MySQL Example
  5. SELECT Specific Row(s) SQL Command MySQL Example
  6. SELECT All Rows SQL Command MySQL Example
  7. Inserting Data Using SQL Command MySQL Example
  8. 19 Examples to Learn MySQL
  9. 28 Basic Tutorials to Learn Oracle
  10. MySQL Sub Query: INSERT INTO SELECT... Example

No comments:

Post a Comment

leave your comments here..