开发者

Mysql preview output before processing?

开发者 https://www.devze.com 2023-01-28 06:39 出处:网络
is there a way to preview a mysql queries result开发者_运维知识库s before processing?If you\'re asking whether it\'s possible to execute MySQL commands, look at the results and decide whether you actu

is there a way to preview a mysql queries result开发者_运维知识库s before processing?


If you're asking whether it's possible to execute MySQL commands, look at the results and decide whether you actually want these changes, look at transactions.

http://dev.mysql.com/doc/refman/5.0/en/commit.html


I've never done it but my guess would be you could create a temporary table from the table in question and run the query on that table. Hopefully this gets you going in the right direction.


It depends on what you want to achieve, if you want to know what mysql will do with your query you might be interessted in http://dev.mysql.com/doc/refman/5.0/en/explain.html


Turn autocommit off, run your query and then rollback. It's universal and I know of no other way that's as simple as this.

0

精彩评论

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