例如,我想导出table1中abc_id=1的记录以及与它联结的table2表中的相应数据,我用mysqldump的where参数似乎不可以联结表:
mysqldump -u root abc table1 table2 --where="abc_id=1 and table1_id in (select id from table1 where abc_id=1)" > example.sql
mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM table1
WHERE abc_id=1 and table1_id in (select id from table1 where abc_id=1)': Unknown column 'table1_id' in 'IN/ALL/ANY subquery'
应该怎样导出这两个表中的数据呢?