As far as I can tell, both syntaxes are equivalent. The first is SQL standard, the second is MySQL’s extension.
So they should be exactly equivalent performance wise.
http://dev.mysql.com/doc/refman/5.6/en/insert.html says:
INSERT inserts new rows into an existing table. The INSERT … VALUES and INSERT … SET forms of the statement insert rows based on explicitly specified values. The INSERT … SELECT form inserts rows selected from another table or tables.
Related Posts:
- Best way to test if a row exists in a MySQL table
- What’s the best way to search for a UPC code in a Database?
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- Unknown column in ‘field list’ error on MySQL Update query
- Unknown column in ‘field list’ error on MySQL Update query
- MySQL – Operand should contain 1 column(s)
- When should I use CROSS APPLY over INNER JOIN?
- MySQL “CREATE TABLE IF NOT EXISTS” -> Error 1050
- MySQL Error: : ‘Access denied for user ‘root’@’localhost’
- MySQL create table if not exists and insert record only if table was created
- How do I use properly CASE..WHEN in MySQL
- How can I do a FULL OUTER JOIN in MySQL?
- MySQL query String contains
- What’s the difference between VARCHAR and CHAR?
- Case statement in MySQL
- How to declare a variable in MySQL?
- MySQL Cannot Add Foreign Key Constraint
- How to split the name string in mysql?
- How do I import an SQL file using the command line in MySQL?
- Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
- mysql Foreign key constraint is incorrectly formed error
- MySQL: Invalid use of group function
- How can I return pivot table output in MySQL?
- Compare dates in MySQL
- MySQL “WITH” clause
- MySQL Multiple Joins in one query?
- Error Code: 2013. Lost connection to MySQL server during query
- MySQL syntax for Join Update
- Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)
- how to drop partition without dropping data in MySQL?
- MySQL combine two columns into one column
- Simple way to calculate median with MySQL
- Error 1046 No database Selected, how to resolve?
- MySQL Error 1264: out of range value for column
- Count(*) vs Count(1) – SQL Server
- Remove duplicate rows in MySQL
- How to SUM and SUBTRACT using SQL?
- Cast from VARCHAR to INT – MySQL
- SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax — PHP — PDO [duplicate]
- How do you force mysql LIKE to be case sensitive?
- MySQL – UPDATE multiple rows with different values in one query
- How to create a MySQL hierarchical recursive query?
- ERROR 1148: The used command is not allowed with this MySQL version
- Insert into a MySQL table or update if exists
- How to round down to nearest integer in MySQL?
- MySQL starts with searching issue
- Query to convert from datetime to date mysql
- Is it possible to GROUP BY multiple columns using MySQL?
- MySQL error: key specification without a key length
- Check if MySQL table exists without using “select from” syntax?
- MySQL equivalent of DECODE function in Oracle
- mysql update column with value from another table
- The used SELECT statements have a different number of columns
- How to delete from multiple tables in MySQL?
- MySQL: Can’t create table (errno: 150)
- How to copy a row and insert in same table with a autoincrement field in MySQL?
- Join vs. sub-query
- Alternative to except in MySQL
- Equivalent of explode() to work with strings in MySQL
- ROW_NUMBER() in MySQ
- MySQL OPTIMIZE all tables?
- MySQL – Get row number on select
- MySQL error: Unknown column in ‘where clause’
- How to truncate the text returned for a column in a MySQL query
- Using union and order by clause in mysql
- MySQL LIKE IN()?
- What’s the best way to dedupe a table?
- WP Optimization: Removing Orphaned wp_options (especially the autoload ones)
- Debugging WordPress
- This SQL request call all time and overload my server : SELECT meta_value FROM wp_sitemeta WHERE meta_key = ‘wp_installer_network’ AND site_id = 1
- Conversion failed when converting date and/or time from character string while inserting datetime
- how to fix oracle ORA-01722 invalid number error
- How do I escape a single quote in SQL Server?
- How do I do multiple CASE WHEN conditions using SQL Server 2008?
- Combining “LIKE” and “IN” for SQL Server
- 1052: Column ‘id’ in field list is ambiguous
- PHP & MySQL: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given [duplicate]
- How to store arrays in MySQL?
- Oracle “Partition By” Keyword
- What is the equivalent of ‘describe table’ in SQL Server?
- Add a column with a default value to an existing table in SQL Server
- SQL ZOO List each continent and the name of the country that comes first alphabetically
- What is the difference between a stored procedure and a view?
- DATEDIFF function in Oracle
- How to do a batch insert in MySQL
- GROUP BY and COUNT using ActiveRecord
- Optimize WordPress Query that take 5 seconds to execute
- Multipart/formatted MySQL query problem
- Extending the database
- Universal problem: first request after ~25 second inactivity always slower (~1 second) than subsequent requests (~1/10sec)
- How do I escape a table name or column name in SQL? esc_sql doesn’t do this
- Alter wp_post table vs. post_meta performance/speed
- How to prevent/delay MySQL connections when an object cache is used?
- Clean up very big and very dirty database
- What is the point of get_comment_count() if you cannot limit by a comment type?
- Bulk delete WordPress Post and all metadata, etc using SQL query
- How to create index (sql) to a meta_key?
- Display MySQL as part of a Page
- SQL query to remove first image in all posts
- Query sql for truncate post_content in wp_posts table