You simply have to do:
INSERT INTO def (catid, title, page, publish)
SELECT catid, title, 'page','yes' from `abc`
More Related Contents:
- INSERT INTO…SELECT for all MySQL columns
- MySQL How do you INSERT INTO a table with a SELECT subquery returning multiple rows?
- “INSERT IGNORE” vs “INSERT … ON DUPLICATE KEY UPDATE”
- How can I make SQL case sensitive string comparison on MySQL?
- Import data in MySQL from a CSV file using LOAD DATA INFILE
- Library not loaded: libmysqlclient.16.dylib error when trying to run ‘rails server’ on OS X 10.6 with mysql2 gem
- Count the occurrences of DISTINCT values
- INSERT INTO … SELECT FROM … ON DUPLICATE KEY UPDATE
- How do I modify a MySQL column to allow NULL?
- Connect to mysql on Amazon EC2 from a remote server
- Docker-compose check if mysql connection is ready
- SQL: selecting rows where column value changed from previous row
- What is the location of mysql client “.my.cnf” in XAMPP for Windows?
- MySQL WHERE IN ()
- Using MySql with Entity Framework 4 and the Code-First Development CTP
- MySQL error 1241: Operand should contain 1 column(s)
- MySQL – Supertype/Subtype design
- How can write queries in MySQL that can parse JSON data in a column?
- Mysql: Order by like?
- MySQL Time Zones
- How to use django models with foreign keys in different DBs?
- How to change MySQL column definition?
- How can I undo a mysql statement that I just executed?
- Continue SQL query even on errors in MySQL workbench
- How to generate a UUIDv4 in MySQL?
- is php sort better than mysql “order by”?
- How can “set timestamp” be a slow query?
- GRANT with database name wildcard in MySQL?
- Using SUM on FLOAT data
- Composite Primary Key performance drawback in MySQL