There doesn’t seem to be a way to get the INSERT
statements from the MySQL console, but you can get them using mysqldump like Rob suggested. Specify -t
to omit table creation.
mysqldump -t -u MyUserName -pMyPassword MyDatabase MyTable --where="ID = 10"
More Related Contents:
- How can I fix MySQL error #1064?
- 1064 error in CREATE TABLE … TYPE=MYISAM
- Using an Alias in SQL Calculations
- What is the question mark’s significance in MySQL at “WHERE column = ?”?
- How do I modify a MySQL column to allow NULL?
- What’s the difference between comma separated joins and join on syntax in MySQL? [duplicate]
- MySQL delimiter syntax error
- GRANT with database name wildcard in MySQL?
- DELETE FROM `table` AS `alias` … WHERE `alias`.`column` … why syntax error?
- Error related to only_full_group_by when executing a query in MySql
- Find duplicate records in MySQL
- How to declare a variable in MySQL?
- Can you split/explode a field in a MySQL query?
- MySQL order by before group by
- MySQL Cannot Add Foreign Key Constraint
- Which is fastest? SELECT SQL_CALC_FOUND_ROWS FROM `table`, or SELECT COUNT(*)
- Grouping into interval of 5 minutes within a time range
- ERROR 1044 (42000): Access denied for user ”@’localhost’ to database ‘db’
- Difference between float and decimal data type
- Parse date in MySQL
- mysql dynamic query in stored procedure
- Table is ‘read only’
- How to select one row randomly taking into account a weight?
- Proper database model for a user feedback system (an interesting case)
- MySQL – Replace Character in Columns
- Sort the rows according to the order specified in WHERE IN clause
- MySQL Select minimum/maximum among two (or more) given values
- connecting to a docker-compose mysql container denies access but docker running same image does not
- mysql – move rows from one table to another
- #1214 – The used table type doesn’t support FULLTEXT indexes