开发者

Convert resultset to table or .sql file in Mysql query browser?

In Mysql query brows开发者_如何学编程er i make a resultset in a table by a query ,please let me know that how can i convert this resultset to a .sql file or to a new table?

thanks


you can run a select query and insert it to table in one command

INSERT INTO tbl_temp2 (fld_id)
    SELECT tbl_temp1.fld_order_id
    FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100;

if the temp table dont exist you can use create table ... select

CREATE TABLE new_tbl SELECT * FROM orig_tbl;


According to MySql Query Browser manual I wasn't able to find any import functionality. Only experimental Regex Text importer tool.

Have you tried MySQL Workbench?

http://dev.mysql.com/downloads/workbench/5.2.html

It's replacing the old MySQL Query Browser.

From Query Browser manual:

You can export any result set from MySQL Query Browser by right-clicking within the result set and choosing an option from the EXPORT RESULTSET sub-menu. You can choose to export the result set in CSV, XML, HTML, Microsoft Excel XLS or PLIST formats.

If you need to work with MySQL Query Browser you could think of exporting in CSV and converting it into .sql file using for instance an online tool:

http://www.withdata.com/csv/csv-to-sql/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜