Skip to main content
added 17 characters in body
Source Link
laura
  • 2.1k
  • 13
  • 37
  • 69

I have two tables:

table1 - columns: id, name table2 - columns: id_table2, id, creation_date 

Is it possible to execute mysqldump like this:

mysqldump --single-transaction -u<uname> -p<pass> <databasename>   <table1> --where="id in (select id from table2 where creation_date>'2016-08-05')"   <table2> --where="creation_date>'2016-08-18'" > D:\dump.sql 

BecauseIs there a syntax error because I get the following error:

mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `table1`   WHERE creation_date>'2016-08-18'': Unknown column 'creation_date' in 'where clause' (1054) 

Is it possible to execute mysqldump like this:

mysqldump --single-transaction -u<uname> -p<pass> <databasename> <table1> --where="id in (select id from table2 where creation_date>'2016-08-05')" <table2> --where="creation_date>'2016-08-18'" > D:\dump.sql 

Because I get the following error:

mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `table1` WHERE creation_date>'2016-08-18'': Unknown column 'creation_date' in 'where clause' (1054) 

I have two tables:

table1 - columns: id, name table2 - columns: id_table2, id, creation_date 

Is it possible to execute mysqldump like this:

mysqldump --single-transaction -u<uname> -p<pass> <databasename>   <table1> --where="id in (select id from table2 where creation_date>'2016-08-05')"   <table2> --where="creation_date>'2016-08-18'" > D:\dump.sql 

Is there a syntax error because I get the following error:

mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `table1`  WHERE creation_date>'2016-08-18'': Unknown column 'creation_date' in 'where clause' (1054) 
edited title
Link
laura
  • 2.1k
  • 13
  • 37
  • 69

mysqldump for multiple tables with wereWHERE clause

Source Link
laura
  • 2.1k
  • 13
  • 37
  • 69

mysqldump for multiple tables with were clause

Is it possible to execute mysqldump like this:

mysqldump --single-transaction -u<uname> -p<pass> <databasename> <table1> --where="id in (select id from table2 where creation_date>'2016-08-05')" <table2> --where="creation_date>'2016-08-18'" > D:\dump.sql 

Because I get the following error:

mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `table1` WHERE creation_date>'2016-08-18'': Unknown column 'creation_date' in 'where clause' (1054)